403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python313/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python313/Lib/test/__pycache__/test_exceptions.cpython-313.opt-2.pyc
�

��ixk����SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKJr SSK	J
r
 SSKJr SSK
JrJrJrJrJrJrJrJr SSKJr SSKJrJr SSKJr SS	KJr SSKrSS
KJ r  "SS
\"5r#"SS\"5r$"SS\"5r%"SS\RL5r'"SS\RL5r("SS\RL5r)"SS\RL5r*Sr+"SS\RL5r,\RZ"SS\RL55r."SS \RL5r/"S!S"\RL5r0\1S#:Xa\Rd"5 gg!\!a SrSr GNf=f)$�N)�BOM_UTF8)�product)�dedent)�captured_stderr�check_impl_detail�cpython_only�
gc_collect�
no_tracing�
script_helper�SuppressCrashReport�force_not_colorized)�
import_module)�TESTFN�unlink)�check_warnings)�support)�INT_MAXi���c��\rSrSrSrSrg)�NaiveException� c��Xlg�N��x��selfrs  �)C:\Python313\\Lib\test\test_exceptions.py�__init__�NaiveException.__init__!�����rN��__name__�
__module__�__qualname__�__firstlineno__r�__static_attributes__�r!rrr s��r!rc��\rSrSrSrSrSrg)�SlottedNaiveException�$rc��Xlgrrrs  rr�SlottedNaiveException.__init__&r r!N)r#r$r%r&�	__slots__rr'r(r!rr*r*$s���I�r!r*c��\rSrSrSrSrg)�BrokenStrException�)c��[S5e)Nzstr() is broken��	Exception�rs r�__str__�BrokenStrException.__str__*s���)�*�*r!r(N)r#r$r%r&r6r'r(r!rr0r0)s��+r!r0c��\rSrSrSrSrSrSrSWSjrSr	S	r
\R"\
\R:�S
5\R""S5\R$"\
SS
S9S555r\S5rSr\R."\R0S:HS5S5rSrSrSrSrSrSrSr Sr!Sr"Sr#Sr$S r%\&S!5r'S"r(S#r)S$r*S%r+S&r,S'r-S(r.S)r/S*r0S+r1S,r2S-r3S.r4S/r5S0r6S1r7S2r8S3r9S4r:S5r;S6r<S7r=S8r>S9r?S:r@S;rAS<rBS=rC\&S>5rD\\R""S5S?55rE\S@5rF\\R"\GSLSA5\HSB555rISCrJ\\R"\R�SD5\R"\GSLSA5SE555rL\\R"\GSLSA5SF55rM\\R"\GSLSA5SG55rN\\R"\GSLSA5SH55rO\&SI5rPSJrQSKrRSLrS\\R"\R�SD5\R"\GSLSA5SM555rTSNrUSOrVSPrW\R."S
SQ5SR5rXSSrY\R"\GSLSA5ST5rZ\\R"\R�SD5SU55r[SVr\g)X�ExceptionTests�0c�L�URXS9 U"S5e!Uan[U5nSnAOSnAff=fU"S5e!Uan[U5nSnAOSnAff=fURXE5 URURU5 SSS5 g!,(df   g=f)N)�exc�excname�spam)�subTest�str�assertEqualr#)rr<r=�err�buf1�buf2s      r�raise_catch�ExceptionTests.raise_catch2s���
�\�\�c�\�
3�
 ��&�k�!���
 ��3�x���
 ��
 ��&�k�!���
 ��3�x���
 �����T�(����S�\�\�7�3�4�
3�
3�sH�B��5�0�B�5�B�A�A�A�B�A�0B�
B#c��UR[S5 UR[[[S5 UR[
S5 [
[SSS9nUR5 [
[SSS9n[RnSSK
nURS	5 U[l	UR5 [[5 UR[S
5 UR[[SS5 UR[S5 UR[[S
5 UR[ S5 /nUR[ UR"S5 UR[$S5 0nUR[$UR"S5 UR[&S5 UR[(S5 UR[*S5 [,nUR[.S5 Sn[1S5HnXD-
nM	 UR[2S5 UR[4S5 UR[6S5 [9S5 UR[:S5 UR[<S5 [?SSS 5 URAS!5 UR[BS"5 UR[DS#5 UR[D[RFS5 UR[HS$5 /S%- UR[JS&5 UR[J[LS'5 UR[NS(5 SS-nUR[PS)5 SS-nUR[RS*5 g![
a GNf=f!U[l	UR5 [[5 f=f![*a GN�f=f![6a GN�f=f![<a GNYf=f![Ha N�f=f![Na N�f=f![Pa
nSnAN�SnAff=f)+N�AttributeError�undefined_attribute�EOFError�w�utf-8��encoding�rrr!�OSErrorzthis file does not exist�ImportError�undefined_module�
IndexError�
�KeyError�key�KeyboardInterrupt�MemoryError�	NameError�
OverflowError���RuntimeError�RecursionError�SyntaxErrorz/
�IndentationError�TabErrorz"try:
	1/0
    	1/0
finally:
 pass
�<string>�execzTabError not raised�SystemError�
SystemExit�	TypeErrorr(�
ValueErrori�ZeroDivisionErrorr4�StopAsyncIteration)*rErH�assertRaises�getattr�sysrJ�openr�close�stdin�marshal�loadsrrPrQ�
__import__rS�__getitem__rUrWrXrY�undefined_variablerZ�ranger]r^r_rcr`ra�compile�failrdre�exitrfrg�chrrhr4ri)r�fp�	savestdinrpr�dummy�es       r�testRaising�ExceptionTests.testRaising?sU������)9�:����.�'�3�8M�N�����:�.�
�&�#��
0��
���
�
�&�#��
0���I�I�	�		�
���
�
�c�"�"�C�I��H�H�J��6�N�����)�,����'�4�)C�S�I�����m�4����+�z�3E�F�����\�2������*�a�m�m�R�8�����:�.������(�A�M�M�5�9����*�,?�@�����m�4�����K�0�#�Q�	
�����8�
���3�Z�E�
�F�A� �	
����~�6�����)9�:�����m�4�
�%�[�	
���)�+=�>�����:�.�
�@���)��i�i�-�.�����m�4�����\�2����*�c�h�h��2�����K�0�
�"�W�	
����\�2����*�c�6�2����*�,?�@��1��Q�	
����K�0��1��Q�	
���+�-A�B��K�
��
��"�C�I��H�H�J��6�N��,��$���� �D� ���������$���!�&�$�&���#�t��#�s��
N�#O�O)�
O:�P�!P�<P+�
N&�"N)�%N&�&N)�),O�
O&�%O&�)
O7�6O7�:
P�P�
P�P�
P(�'P(�+
P?�:P?c�L^�U4SjnSnU"US5 U"SS5 U"SS5 g)Nc�*>�TRXS9 [USS5 TRS5 SSS5 g![a=nURU:wa#TRSU<SUR<35 SnANKSnAff=f!,(df   g=f)N)�src�msg�
<fragment>rc�"failed to get expected SyntaxError�	expected �, got )r?rvrwr_r�)r�r�r}rs   �r�ckmsg�4ExceptionTests.testSyntaxErrorMessage.<locals>.ckmsg�sx������#��/�D��C��v�6�
�I�I�B�C�0�/��#�H��u�u��|��	�	�3����"F�G���H��0�/�s1�B�
:�B�
B�3A<�7B�<B�B�
BzHif 1:
        try:
            continue
        except:
            passz'continue' not properly in loopz	continue
zf'{6 0}'z+invalid syntax. Perhaps you forgot a comma?r(�rr��ss`  r�testSyntaxErrorMessage�%ExceptionTests.testSyntaxErrorMessage�s3���	D�
��	�a�2�3�
�l�=�>�
�j�G�Hr!c�^�[4U4SjjnSnU"US5 SnU"US5 SnU"US5 SnU"US5 SnU"US5 S	nU"US
5 SnU"US
5 SnU"US
[5 SnU"US[5 g)Nc��>�[USS5 TRS5 g!UaBnURU:wa(TRSU<SUR<35 SnAgSnAgSnAff=f)Nr�rcr�r�r�)rvrwr�)r�r��	exceptionr}rs    �rr��:ExceptionTests.testSyntaxErrorMissingParens.<locals>.ckmsg�s`���
@���\�6�2�
�	�	�>�?��	�
D��5�5�C�<��I�I�s�A�E�E�B�C�C� ��
D�s�
"�A*�3A%�%A*zprint "old style"z@Missing parentheses in call to 'print'. Did you mean print(...)?zprint "old style",zprint f(a+b,c)zexec "old style"z>Missing parentheses in call to 'exec'. Did you mean exec(...)?z
exec f(a+b,c)zprint (a+b,c) $ 42zinvalid syntaxzexec (a+b,c) $ 42zif True:
print "No indent"z9expected an indented block after 'if' statement on line 1z6if True:
        print()
	exec "mixed tabs and spaces"z2inconsistent use of tabs and spaces in indentation)r_r`rar�s`  r�testSyntaxErrorMissingParens�+ExceptionTests.testSyntaxErrorMissingParens�s����&1�	@�
$��
�a�S�T�$��
�a�S�T���
�a�S�T�"��
�a�Q�R���
�a�Q�R�

!��
�a�!�"���
�a�!�"�
.��
�a�L�N^�_�K��
�a�E�x�Pr!Nc��URXUS9 UR[5n[USS5 SSS5 UR	WR
RU5 UR	UR
RU5 Ub&UR	UR
RU5 Ub&UR	UR
RU5 UR
Rbc[U[5(dURUS5nURS5US-
nURX�R
R5 SSS5 g!,(df   GN0=f!,(df   g=f)N)�source�lineno�offsetr�rc�replace�
r[)r?rjr_rvrAr�r�r��
end_lineno�
end_offset�text�
isinstancer@�decode�split�assertIn)	rr�r�r�r�r�rN�cm�lines	         r�check�ExceptionTests.check�s��
�\�\��F�\�
C��"�"�;�/�2���\�6�2�0����R�\�\�0�0�&�9����R�\�\�0�0�&�9��%�� � ����!8�!8�*�E��%�� � ����!8�!8�*�E��|�|� � �,�!�#�s�+�+��*�*�X�y�9�C��y�y���v�a�x�0���
�
�d�L�L�$5�$5�6�D�
C�/�/��D�
C�s"�E0�E�D E0�
E-	�(E0�0
E>c�0�URnU"SSS5 g)Nz"\
"(1 for c in I,\
\�)r��rr�s  r�)test_error_offset_continuation_characters�8ExceptionTests.test_error_offset_continuation_characters�s���
�
��
�*�A�q�1r!c�4�URnU"SSS5 U"SSS5 U"SSS5 U"S	SS
5 U"SSS
5 U"SSS
SS9 U"SSS5 U"SSS5 U"SSS5 U"SSS5 U"SSS5 U"SSS5 U"SSS5 U"SSS5 U"SSS5 U"SSS
5 U"SSS5 U"SSS5 U"S SSSS!5 U"S"SSSS
5 U"S#SS$SS%5 U"S&SS$SS%5 U"S'SS5 U"S(SS5 U"S)SS5 U"S*SS5 U"S+SS,5 U"S-SS,5 U"S.SS5 U"S/SS$5 U"S0SS5 U"S1SS,5 U"S2SS5 U"S3SS$5 U"S4SS$5 U"S5SS$S6S9 U"S7SS85 U"S9SS5 U"S:SS5 U"S;SS5 U"S<S=S>5 U"S?SS@5 U"SASS@5 U"SBSSC5 U"SDR5SSSS5 U"SESS5 U"SFSS@5 U"SGSS5 U"SHSSI5 U"SJSS5 U"SKSS5 U"SLSS5 U"SMSS5 U"SNSS85 U"SOSS85 U"SPSS5 U"SQSS5 U"SRSS5 U"SSSS5 U"STSS5 U"SUSS5 U"SVSS5 U"SWSS5 g)XNzdef fact(x):
	return x!
r�rTz1 +
r[�z def spam():
  print(1)
 print(2)�zPython = "Python" +�uPython = "Ṕýţĥòñ" +s+# -*- coding: cp1251 -*-
Python = "ϳ���" +��cp1251rMsPython = "ϳ���" +zx = "a�zlambda x: x = 2zf{a + b + c}zile for str(file) in []
]�ua = « hello » « world »z[
file
for str(file)
in
[]
]zile for
 str(file) in []]zages = {'Alice'=22, 'Bob'=23}�	z7match ...:
    case {**rest, "key": value}:
        ...z
[a b c d e f]zfor x yfff:�zf(a for a in b, c)�zf(a for a in b if a, c)zf(a, b for b in c)��zf(a, b for b in c, d)zclass foo:return 1zdef f():
  continuezdef f():
  breakz4try:
  pass
except:
  pass
except ValueError:
  passztry:
  pass
except*:
  pass�z6try:
  pass
except*:
  pass
except* ValueError:
  passz(0x+1)zx = 0xIz0010 + 2z
x = 32e-+4zx = 0o9uα = 0xIsα = 0xIs## -*- coding: iso8859-7 -*-
� = 0xIz	iso8859-7s�if 1:
            def foo():
                '''

            def bar():
                pass

            def baz():
                '''quux'''
            �z"pass
pass
pass
(1+)
pass
pass
passz(1+)z[interesting
foo()
s#coding: utf8
print('我')
r���z7f'''
            {
            (123_a)
            }'''�ztf'''
            {
            f"""
            {
            (123_a)
            }
            """
            }'''z4f"""


            {
            6
            0="""�
ub"fooжжж"z!x = [(yield i) for i in range(3)]zdef f():
  from _ import *zdef f(x, x):
  passz3{i for i in range(5) if (j := 0) for j in range(5)}�&zdef f(x):
  nonlocal xzdef f(x):
  x = 1
  global xz
nonlocal xz def f():
  global x
  nonlocal xz#from __future__ import doesnt_existzfrom __future__ import bracesz#x=1
from __future__ import divisionzfoo(1=2)zdef f():
  x, y: intz[*x for x in xs]zfoo(x for x in range(10), 100)zfor 1 in []: passz
(yield i) = 2zdef f(*):
  pass)r��encoder�s  r�testSyntaxErrorOffset�$ExceptionTests.testSyntaxErrorOffset�s����
�
��
�+�Q��3�
�g�q�!��
�2�A�r�:�
�#�Q��+�
�;�Q��C�
�L���h�	(�
�2�A�r�:�
�h��1��
���A�&�
�n�a��#�
�,�a��4�
�+�Q��2�
�1�1�a�8�
�,�a��3�
�-�q�!�4�
�I�1�b�Q�
�o�q�!�$�
�m�Q��"�
�"�A�q�!�R�0�
�'��A�q�"�5�
�"�A�q�!�R�0�
�%�q�!�Q��3�	�"�A�r�*�
�$�a��+�
�!�1�a�(�
�I�1�a�P�
�.��1�5�
�K�Q�PQ�R�	�h��1��
�i��A��
�j�!�Q��
�l�A�q�!�
�i��A��
�n�a��#�
���A�&�
�8�!�Q�"�	$�
�	��B�		�	�8�!�Q�?�
�f�a���
�%�q�!�,�
�C�Q��K�
����	�	����	�	��
��	�	�n�#�#�%�q�!�Q��3�	�1�1�a�8�
�+�Q��3�
�$�a��,�
�C�Q��K�
�'��A�.�
�.��1�5�
�l�A�q�!�
�2�A�q�9�	�3�Q��;�
�-�q�"�5�
�4�a��;�
�j�!�Q��
�%�q�!�,�
� �!�Q�'�
�.��1�5�
�!�1�a�(�
�o�q�!�$�
�!�1�a�(r!z)Downcasting to int is safe for col_offset�cpur�F)�memuse�dry_runc��SUS4-nUR[S5 [USS5 SSS5 g!,(df   g=f)Nsif True:
%*sspasszParser column offset overflowr�rc)�assertRaisesRegexrZrv)r�sizer�s   r�testMemoryErrorBigSource�'ExceptionTests.testMemoryErrorBigSourceMs<���$���0��
�
#�
#�M�3R�
S��C��v�.�T�
S�
S�s	�5�
Ac�P^^^�"SS[5m"SS5m[R"[SLS5UU4Sj5n[R"[SLS5UU4Sj5n[R"[SLS5UU4Sj5nU"5 U"5 U"5 g)	Nc��\rSrSrSrSrg)�9ExceptionTests.testSettingException.<locals>.BadExceptioniZc��[S5e)Nzcan't instantiate BadException)r])�self_s rr�BExceptionTests.testSettingException.<locals>.BadException.__init__[s��"�#C�D�Dr!r(Nr"r(r!r�BadExceptionr�Zs��
Er!r�c��\rSrSrSrg)�=ExceptionTests.testSettingException.<locals>.InvalidExceptioni^r(N�r#r$r%r&r'r(r!r�InvalidExceptionr�^���r!r��requires _testcapic�R>�[R"TS5 TRS5 g![apnURR
RnTRURS5 TRURRS55 SnAgSnAff=f)Nr[�Expected exception�
test_capi1�test_exceptions.py)�	_testcapi�raise_exceptionrwrf�
__traceback__�tb_frame�f_coderA�co_name�
assertTrue�co_filename�endswith)rB�cor�rs  ��rr��7ExceptionTests.testSettingException.<locals>.test_capi1as����
0��)�)�,��:��	�	�.�/���
O��&�&�/�/�6�6��� � ����\�:������� 7� 7�8L� M�N�N��
O�s�,�
B&�A&B!�!B&c��>�[R"TS5 TRS5 g![a�nURR
nURRnTRURS5 TRURRS55 URRRnTRURS5 SnAgSnAff=f)Nrr�rr��
test_capi2)r�r�rwr]r��tb_nextr�r�rAr�r�r�r��f_back)rB�tbr��co2r�rs    ��rr��7ExceptionTests.testSettingException.<locals>.test_capi2ls����

0��)�)�,��:��	�	�.�/�� �
<��&�&�.�.���[�[�'�'��� � ����Z�8������� 7� 7�8L� M�N��k�k�(�(�/�/��� � ����l�;�;��

<�s�,�
C.�B.C)�)C.c�R>�TR[[RTS5 g�Nr[)rjrdr�r�)r�rs��r�
test_capi3�7ExceptionTests.testSettingException.<locals>.test_capi3zs ������k�9�+D�+D�.��
3r!)r4�unittest�skipIfr�)rr�r�r�r�r�s`   @@r�testSettingException�#ExceptionTests.testSettingExceptionUs����
	E�9�	E�	�	�
����d�*�,@�	A�	0�
B�	0�
����d�*�,@�	A�	0�
B�	0�
����d�*�,@�	A�	3�
B�	3�	�����r!c��[ UR[[5 UR[	[S55S5 UR[	[SS55S5 [SSS5nURUR
S5 URURS5 UR[	U5S5 [S	SSS
5nURUR
S5 URURS
5 URURS5 URURS5 URURS5 UR[	U5S5 [S	SSS5nURUR
S
5 URURS5 URURS5 URURS5 URURS5 UR[	U5S5 [SS5nURUR
S5 URURS5 URURS5 URURS5 URURS5 g![a gf=f)Ni��1001�messagez[Errno 1001] messager��foo�barz[Errno 9] foo: 'bar'rr�r�z[WinError 3] foo: 'bar'�z[WinError 1001] foo)�WindowsError�assertIsrPrAr@�errno�winerror�strerror�filename�	filename2rY)rrKs  r�test_WindowsError� ExceptionTests.test_WindowsError�s6��$	0��
�M�M�,��0����S����/��8����S���y�!9�:�3�
5���5�%�(�A����Q�W�W�a�(����Q�Z�Z��.����S��V�%;�<���5�%��+�A����Q�W�W�a�(����Q�Z�Z��+����Q�Z�Z��/����Q�Z�Z��/����Q�[�[�$�/����S��V�%>�?���5�$��-�A����Q�W�W�b�)����Q�Z�Z��.����Q�Z�Z��/����Q�Z�Z��.����Q�[�[�$�/����S��V�%:�;���u�%�A����Q�W�W�e�,����Q�Z�Z��.����Q�Z�Z��/����Q�Z�Z��.����Q�[�[�$�/��E�	��	�s�K�
K�K�win32ztest specific to Windowsc��[S5nSnUR[SU-5 URR	U5 SSS5 g!,(df   g=f)N�ctypeslcs�@zWindows Error 0x%x)rr�rP�	pythonapi�PyErr_SetFromWindowsErr)rr�codes   r�test_windows_message�#ExceptionTests.test_windows_message�sJ���x�(����
�
#�
#�G�-A�D�-H�
I����4�4�T�:�J�
I�
I�s�A�
Ac�n�[S0SS04[S0SS04[S0SS04[S0SS04[S0SSS.4[S0SSSSSS.4[S	0S	SSSS
S.4[S0S	SSSS
S.4[S
0S	SSS.4[S0SSSSS.4[S0SSSSSS.4[S0SSSSSSSS.4[S0SSSSSSSSS.4[S0SS SSSSS!S"S#S$.	4[S%0SS%SSSSSSSS&.	4[S0SS04[
S'0S'S(S)S*S+S,.4[S([S-5S*SS+40S([S-5S*SS+4S(S-S*S+S,.4[S.0S.S(S-S*S+S,.4[S/0S/S0S1S*SS2.4[S0SSS3.4[S0SSS3.4[S[S4S5S69[SS4S5S794/nUR[S0SSSSSSS8.45 UGHdup#pEU"U0UD6n[!U5R"R%S95(d%UR'[!U5R(S:5 [+U5nUHFn[-Xh5n	UR'[/U	5[/XX5U<S;U<S<U	<S=XX<35 MH [04H�n
[3U
R4S-5H�nU
R7Xk5nU
R9U5nUHZn[/[-X�55n
U[:XaUS5:Xa[/S5nO
[/XX5nUR'X�S>U<S?U<35 M\ M� M� GMg g![a GNyf=f! [;S@U<SAU<3[<R>SB9 GM�=f)CNr(�args)r[)r�)r�r[r�)rr)rr�r�r�r�)r�r�r�)r�r��bazr)r�r�rN�quuxr
)rr�r�)�errnoStr�strErrorStr�filenameStr)rrrrr)rr�r�r�)r[rr)r[rr[)rr�r�r�r�)r�r�r�r�r�r��print_file_and_line)�msgStrr)rr�rr�r�r�r�r�)r)r�	linenoStr�	offsetStr�textStr�endLinenoStr�endOffsetStrrrrrr)	r�r�rrr�r�r�r�r�)rrrrrrr�print_file_and_lineStr)	r�rrr�r�r�r�r�r�)�ascii�arr[�ordinal not in rangerrrr)rrN�object�start�reason��)rrrr[r)�あrr[�ouchr r!)rrrr�end)rr�name�obj�r#r$)rr#r$)rr�r�r�r�r�r�builtins�.z == z, expected z	pickled "z", attribute "z
exc=z, args=)�file) �
BaseExceptionrerPr_�UnicodeError�UnicodeEncodeError�UnicodeDecodeError�	bytearray�UnicodeTranslateErrorrr*rH�dict�appendr�rY�typer#r�rAr$r@rk�repr�pickleru�HIGHEST_PROTOCOL�dumpsrq�printrl�stderr)r�
exceptionListr<r�kwargs�expectedr}r��checkArgName�value�p�protocol�new�got�wants               r�testAttributes�ExceptionTests.testAttributes�s����B��V�b�M�2�
�E�2����7�
�H�b��(�#�
%�
�J���*�%�
'�
��2�"�U�3�
5�
�h��"��T��d�4�
5��n�b�(�"�$� �u�6�
7��+�R�(�#�4� �u�6�
7��9�2�(�u�6�R�
T�
�@�"�5�+�z�+�-�
.��7��,��+�+�4�A�
B��"�b�4�$�!�d�t�"�D�#B�
C��+�r�%��)-�x�"�t��#�%�
&�
�G�HJ�'�)�G�*.�x�+��-�^�
M�
N��5�68��5�*.�x�"�t��#�4�
9�	
:��2�r�F�R�>�2�
�":�;=�C�%�#��)?�A�
B� �'�9�W�+=�q�!�"8�":�;=�"�I�g�$6��1�+A�C�%�'��)?�A�
B� �":�;=�C�%�'��)?�A�
B�#�$<�b�2�$���a�)�
*��X�r�!��.�
0�
"�H�b�!��.�
0�
�X�t��U�'C��(��U�;�
=�iV
�
�n
	�� � ��@�"�0�"/�d� �"/�t�E�F�
�,9�'�C�v�"
@���(��(���A�w�'�'�0�0�1A�B�B��$�$�T�!�W�%7�%7��D���F��$,�L�#�A�4�E��$�$�T�%�[�%)�(�*@�%A�%&��%*�H�,B�&D�E�%-�!��A�$)�!�*<�*<�q�*@�$A���G�G�A�0���g�g�a�j��,4�L�"&�w�s�'A�"B�C�"�n�4���9N�(,�D�z��'+�H�,B�'C�� �,�,�S�$�./��.?�@�-5�%B�"�+,9���	��	��
H���s�g�W�T�H�5�C�J�J�G�s�1 K=�L�=
L�
L�"L4c��[S5nSUlURURS5 URURS5 UR	[
[US5 UR	[
[US5 URSSS.5 URURS5 URURS5 URURS5 URURS5 URS	S
SS.5 URURS
5 URURS5 URURS	5 URURS5 g)
N�*�5)rEr�br[r�)rrGr�)r[r�r��#)rr�blah)
r4rIrArrjrHrk�__setstate__rrG�rr}s  r�
test_setstate�ExceptionTests.test_setstate?s&���b�M������������'��������$����.�'�1�c�:����.�'�1�c�:�	���Q�a�(�)��������'��������$�������a� �������a� �	���R��"�=�>��������)��������$�������b�!�������a� r!c��[S5nUR[S5 URS5 SSS5 g!,(df   g=f)NrEzstate is not a dictionary)r4r�rfrJrKs  r�test_invalid_setstate�$ExceptionTests.test_invalid_setstateQs5���b�M��
�
#�
#�I�/J�
K�
�N�N�2��L�
K�
K�s	�=�
Ac���[S5[S5[S54GH�nURUS9 UR	[US55 UR
S5 URURS/5 UR[5 UR
S5 SSS5 URURS/5 UR
S5 URURSS/5 U?UR	[US55 UR
S	5 URURS	/5 SUlURURS5 UR[5 UR
S
5 SSS5 URURS5 SSS5 GM� g!,(df   GN"=f!,(df   NJ=f!,(df   GM�=f)Nr[r�r��r}�	__notes__zMy NoterEz	Your NotezOur Notez
will not work)r)r4rgr?�assertFalse�hasattr�add_noterArSrjrfrKs  r�
test_notes�ExceptionTests.test_notesVsl����"�I�a�L�*�Q�-�@�A������"�� � ���K�!8�9��
�
�9�%�� � ����y�k�:��&�&�y�1��J�J�r�N�2�� � ����y�k�:��
�
�;�'�� � ����y�+�.F�G��K�� � ���K�!8�9��
�
�:�&�� � ����z�l�;� ���� � ����b�1��&�&�y�1��J�J��/�2�� � ����b�1�/#�"�A�2�1�� 2�1��+#�"�s=�AG#�G�%CG#�<G�$G#�
G�
G#�
G �G#�#
G3	c�4�[S5e![anURnSnAOSnAff=f[5R	U5nURU[5 UR
URU5 [S5R	U5nURU[5 UR
URU5 "SS[5nU"5R	U5nURX5 UR
URU5 g)Nr�r�c��\rSrSrSrg)�5ExceptionTests.testWithTraceback.<locals>.MyExceptionir(Nr�r(r!r�MyExceptionr[r�r!r\)rSr4r�r)�with_traceback�assertIsInstancerA)rr}r�r\s    r�testWithTraceback� ExceptionTests.testWithTracebackqs���	!��Q�-����	!����B��	!��
�O�*�*�2�.�����a��/�������"�-��q�M�(�(��,�����a��,�������"�-�	�)�	�
�M�(�(��,�����a�-�������"�-��
�
-�(�-c��S[5lURS5 g![a%nUR	S[U55 SnAgSnAff=f)Nr��No exception raisedz!__traceback__ must be a traceback)r4r�rwrfr�r@rKs  r�testInvalidTraceback�#ExceptionTests.testInvalidTraceback�sJ��	-�()�I�K�%�
�I�I�+�,���	G��M�M�=�s�1�v�F�F��	G�s�#�
A�A
�
Ac��[n[5nSnURX[USS5 SnURX[USS5 SnURX[USS5 SnURX[US	S5 g)
Nz'int' object is not iterablerr[z)__traceback__ must be a traceback or Noner�z9exception cause must be None or derive from BaseException�	__cause__z;exception context must be None or derive from BaseException�__context__)rfr4r��setattr)r�TEr<r�s    r�test_invalid_setattr�#ExceptionTests.test_invalid_setattr�sz��
���k��,�����r���f�a�@�9�����r���o�q�I�I�����r���k�1�E�K�����r���m�Q�Gr!c��[n[S5e![anUnSnAOSnAff=fSnURX[US5 URX[US5 URX[US5 URX[US5 g)Nr�zmay not be deletedrr�rgrh)rfrSr4r��delattr)rrjr}r<r�s     r�test_invalid_delattr�#ExceptionTests.test_invalid_delattr�s���
��	��Q�-����	��C��	��#�����r���f�=����r���o�F����r���k�B����r���m�Ds��
)�$�)c���[S5e![anURnSnAOSnAff=f[5nX!lSUlURURS5 g)Nr�)rSr4r�rA)rr}r�s   r�testNoneClearsTracebackAttr�*ExceptionTests.testNoneClearsTracebackAttr�sS��	!��Q�-����	!����B��	!��
�K�������������$�/rac��[5nURUR5 URUR5 [	5nURUR5 URUR5 "SS[
5nU"5nURUR5 URUR5 g)Nc��\rSrSrSrg)�5ExceptionTests.testChainingAttrs.<locals>.MyExceptioni�r(Nr�r(r!rr\rv�r�r!r\)r4�assertIsNonerhrgrfrP)rr}r\s   r�testChainingAttrs� ExceptionTests.testChainingAttrs�s����K�����!�-�-�(����!�+�+�&��K�����!�-�-�(����!�+�+�&�	�'�	�
�M�����!�-�-�(����!�+�+�&r!c�
�[5e![anUnSnAOSnAff=fURUR5 URUR5 UR	UR
5 [
5UlSUlURUR[5 URUR5 URUR
5 SUlUR	UR
5 g)NF)	r4rwrhrgrT�__suppress_context__rYr^r�)rr<r}s   r�testChainingDescriptors�&ExceptionTests.testChainingDescriptors�s���	��+����	��A��	��	
���!�-�-�(����!�+�+�&�����/�/�0�!���
�������a�m�m�Y�7����!�+�+�&�����.�.�/�!&�������/�/�0s�
�
"��"c��UR[[SS9 "SS[5nU"SS9nURURS5 g)Nr[)rc��\rSrSrSrSrg)�8ExceptionTests.testKeywordArgs.<locals>.DerivedExceptioni�c�:�[RU5 Xlgr)r)r�	fancy_arg)rr�s  rr�AExceptionTests.testKeywordArgs.<locals>.DerivedException.__init__�s���&�&�t�,�!*�r!�r�Nr"r(r!r�DerivedExceptionr��s��
+r!r�rEr�)rjrfr)rAr�)rr�rs   r�testKeywordArgs�ExceptionTests.testKeywordArgs�sE��	
���)�]�a��8�	+�}�	+�

�r�*��������b�)r!c�x^^�U4SjmUR[T5 U4SjmUR[T5 g)Nc�>�T"5$rr()�fs�rr��/ExceptionTests.testInfiniteRecursion.<locals>.f�s
����3�Jr!c�4>�T"5$![a gf=f)Nr��rg��gs�rr��/ExceptionTests.testInfiniteRecursion.<locals>.g�s!���
��s�
���
��
�s�
�
�)rjr^)rr�r�s @@r�testInfiniteRecursion�$ExceptionTests.testInfiniteRecursion�s/���	����.�!�,�	�
	
���.�!�,r!c���UR[[55 UR[[S555 UR[[SS555 g)NrrG)r�r@r4r5s r�test_str�ExceptionTests.test_str�s?������I��'�����I�c�N�+�,�����I�c�3�/�0�1r!c�
�[5e![a nURU[5 SnAOSnAff=fURS[55 UR	[
5 W SSS5 g!,(df   g=f�Nr}�r4r^�assertNotIn�localsrj�UnboundLocalErrorrKs  r�test_exception_cleanup_names�+ExceptionTests.test_exception_cleanup_names�sb��	0��+����	0��!�!�!�Y�/�/��	0������f�h�'�
�
�
�0�
1�
�2�
1�
1�s�
�
6�1�6�(A4�4
Bc��[5e![a!nURU[5 ASnAOSnAff=fURS[55 UR	[
5 W SSS5 g!,(df   g=fr�r�rKs  r�test_exception_cleanup_names2�,ExceptionTests.test_exception_cleanup_names2�sd��	��+����	��!�!�!�Y�/���	��	
����f�h�'�
�
�
�0�
1�
�2�
1�
1�s�
�
7�2�7�)A5�5
Bc�^^�"SS[5m"SS5nUU4SjnU"5m[R"T5nU"5 Sm[5 U"5mUR	T5 U"5m[R"T5nU"5 Sm[5 U"5mUR	T5 U"5m[R"T5nU"5 Sm[5 U"5mUR	T5 U"5m[R"T5nSHnU"5 M
 Sm[5 U"5mUR	T5 U"5m[R"T5nU"5 U"5m[R"T5nU"5 Sm[SS9(a
[5 U"5mUR	T5 "S	S
5nU"5m[R"T5nU"5 U"5 SSS5 Sm[SS9(a
[5 U"5mUR	T5 g!TanSnAGNSnAff=f!Ta GN�f=f! GN�=f!  GMB=f! [
e=f![
aNnSUlSm[5 U"5m[SS9(a
[5 UR	T5 SnAGNYSnAff=f!Ta e!e=f!Ta GNTf=ff=f!,(df   N�=f)Nc��\rSrSrSrSrg)�=ExceptionTests.testExceptionCleanupState.<locals>.MyExceptionic��Xlgr�r$�rr$s  rr�FExceptionTests.testExceptionCleanupState.<locals>.MyException.__init__����r!r�Nr"r(r!rr\r����
r!r\c��\rSrSrSrg)�7ExceptionTests.testExceptionCleanupState.<locals>.MyObjir(Nr�r(r!r�MyObjr�r�r!r�c�>�TnT"T5err()�	local_refr\r$s ��r�inner_raising_func�DExceptionTests.testExceptionCleanupState.<locals>.inner_raising_funcs����I��c�"�"r!)rF)�cpythonc� �\rSrSrSrSrSrg)�9ExceptionTests.testExceptionCleanupState.<locals>.Contextitc��U$rr(r5s r�	__enter__�CExceptionTests.testExceptionCleanupState.<locals>.Context.__enter__u����r!c��g)NTr()r�exc_type�	exc_value�exc_tbs    r�__exit__�BExceptionTests.testExceptionCleanupState.<locals>.Context.__exit__ws��r!r(N�r#r$r%r&r�r�r'r(r!r�Contextr�ts��
�
r!r�)r4�weakref�refr	rwrUrhr)	rr�r��wrr}�ir�r\r$s	       @@r�testExceptionCleanupState�(ExceptionTests.testExceptionCleanupState
s����	�)�	�	�	�	#��g��
�[�[��
��	�� ������d�����#���g��
�[�[��
��	�� ������d�����#���g��
�[�[��
��	�� ������d�����#���g��
�[�[��
���A�
�"�$��
�����d�����#���g��
�[�[��
��	#�
�"�$�$�g��
�[�[��
��		�� ����U�+��L��d�����#��	�	�
�g��
�[�[��
��
�Y�� �����U�+��L��d�����#���G�	���	���	��	��	���
���
�����	#�
!�A�M��C��L��$�C� ��/������c�"�"��	#��&�	�
�������
��
��
	��,�Y�s��H>�
I�I�!I'�/I1�K�;K7�>I�
I�I�I�I$�'I.�1I9�9I<�<
K�AK�K�K4�K � K"�"K%�%K0�+K4�/K0�0K4�7
Lc�\^�U4Sjn[ g![amU"5 Sm@gSm@ff=f)Nc�
>�T grr(rRs�r�print_error�IExceptionTests.test_exception_target_in_nested_scope.<locals>.print_error�s���
r!)�	somethingr4)rr�r}s  @r�%test_exception_target_in_nested_scope�4ExceptionTests.test_exception_target_in_nested_scope�s'���	�	����	��M�M��	�s��
+�&�+c�N�SnU"5nUR[U5[5 UR[R
"55 UR[U5[5 UR[R
"55 UR[U55 [
S5e![a� U"5nUR[U5[5 UR[R
"5[5 UR[U5[5 UR[R
"5[5 UR[U5[5 AUR[R
"5[5 gf=f)Nc3��# �[S5e![a1 [R"5v� [R"5v� Of=f[R"5v� g7f)N�caught)rUrlr�r(r!r�yield_raise�:ExceptionTests.test_generator_leaking.<locals>.yield_raise�sJ���
&��x�(�(���
&��m�m�o�%��m�m�o�%�
&���-�-�/�!�s �A%��8A
�A%�	A
�
A%r�)r^�nextrUrwrlr�rf)rr�r�s   r�test_generator_leaking�%ExceptionTests.test_generator_leaking�s��	"�
�M�����d�1�g�x�0����#�-�-�/�*����d�1�g�x�0����#�-�-�/�*����$�q�'�"�
	>��E�"�"���	>��
�A��!�!�$�q�'�8�4��!�!�#�-�-�/�9�=��!�!�$�q�'�8�4��!�!�#�-�-�/�9�=��!�!�$�q�'�9�5���!�!�#�-�-�/�9�=�	>�s�,B7�7C*F$�#F$c���Sn[e![a U"5n[U5 Of=f[U5 O![a Of=fUR[R
"55 g)Nc3�# �Sv� g7frr(r(r!rr��1ExceptionTests.test_generator_leaking2.<locals>.g�s������)r]r��
StopIterationrwrlr��rr��its   r�test_generator_leaking2�&ExceptionTests.test_generator_leaking2�sa��	�	�����	���B���H�	��	���H���	��	�����#�-�-�/�*s��*�*�:�
A�Ac��SnU"5n[U5 SS- UR
[R"55 g![avnUR[R"5U5 URU5nUR[R"5U5 URXC5 SnAN�SnAff=f)Nc3�d# �Sv� g![a [R"5v� gf=f7fr�rhrlr�r(r!rr��1ExceptionTests.test_generator_leaking3.<locals>.g�s'���
&���$�
&��m�m�o�%�
&�s�0�	�0�!-�0�-�0r[r)r�rhr�rlr��throwrw)rr�r�r}�gen_excs     r�test_generator_leaking3�&ExceptionTests.test_generator_leaking3�s���	&�
�S���R��	&�
�a�C�	
���#�-�-�/�*��!�	&��M�M�#�-�-�/�1�-��h�h�q�k�G��M�M�#�-�-�/�1�-��M�M�'�%�%��		&�s�A�
C�A,B<�<Cc�t�SnU"5n[e![a [[U55nOf=fURU[5 [U5 O<![a/nUR[
R"5U5 SnAOSnAff=fUR[
R"55 g)Nc3�d# �SS- g![a [R"5v� ef=f7f�Nr[rr�r(r!rr��1ExceptionTests.test_generator_leaking4.<locals>.g�s.���
��!���$�
��m�m�o�%��
�s�0�
�0�#-�0)rfr1r�r�rhrlr�rw)rr�r��tpr}s     r�test_generator_leaking4�&ExceptionTests.test_generator_leaking4�s���	��S��	 ��O���	 ��d�2�h��B�	 ��	
�
�
�b�+�,�	.���H��!�	.��M�M�#�-�-�/�1�-�-��	.��	
���#�-�-�/�*s$��3�3�
A�
B�#%B
�
Bc�^�U4SjnU"5n[e![a [U5 Of=fTR[[U5 g)Nc3�># �TR[R"5[5 Sv� TR	[R"55 g7fr)r^rlr�r]rwr5s�rr��>ExceptionTests.test_generator_doesnt_retain_old_exc.<locals>.g�s3�����!�!�#�-�-�/�<�@�����c�m�m�o�.�s�AA)r]r�rjr�r�s`  r�$test_generator_doesnt_retain_old_exc�3ExceptionTests.test_generator_doesnt_retain_old_exc�sD���	/��S��	�����	���H�	�����-��r�2s��.�.c�^�SmU4SjnU"5 [5 UR[R"55 g)Nc3�# �Sv� g7fr�r(r(r!r�
simple_gen�NExceptionTests.test_generator_finalizing_and_sys_exception.<locals>.simple_gen�s
����G�r�c�V>�T"5n[e![a [U5s$f=fr)r]r�)�genr�s �r�run_gen�KExceptionTests.test_generator_finalizing_and_sys_exception.<locals>.run_gen�s.����,�C�
!�"�"���
!��C�y� �
!�s��(�()r	rwrlr�)rr�r�s  @r�+test_generator_finalizing_and_sys_exception�:ExceptionTests.test_generator_finalizing_and_sys_exception�s-���	�	!�	�	������#�-�-�/�*r!c�^^�"SS[5m"SS5nUU4SjnU"5m[R"T5nU"5n[U5 U"U5 S=nm[	5 U"5mURT5 g)Nc��\rSrSrSrSrg)�FExceptionTests._check_generator_cleanup_exc_state.<locals>.MyExceptionic��Xlgrr�r�s  rr�OExceptionTests._check_generator_cleanup_exc_state.<locals>.MyException.__init__r�r!r�Nr"r(r!rr\r�r�r!r\c��\rSrSrSrg)�@ExceptionTests._check_generator_cleanup_exc_state.<locals>.MyObji	r(Nr�r(r!rr�r	r�r!r�c3�>># �T"T5e!Ta Sv� gf=f7frr()r\r$s��r�raising_gen�FExceptionTests._check_generator_cleanup_exc_state.<locals>.raising_gens'����
�!�#�&�&���
��
�s��
�
���)r4r�r�r�r	rw)r�testfuncr�rr�r�r\r$s      @@r�"_check_generator_cleanup_exc_state�1ExceptionTests._check_generator_cleanup_exc_statesm���	�)�	�	�	�	��g��
�[�[��
���M���Q��������C����d�����#�r!c�,�SnURU5 g)Nc�X�UR[55 g![a gf=fr)r�r]r�s r�do_throw�GExceptionTests.test_generator_throw_cleanup_exc_state.<locals>.do_throws'��
������'���
��
�s��
)�)�r)rrs  r�&test_generator_throw_cleanup_exc_state�5ExceptionTests.test_generator_throw_cleanup_exc_states��	�
	
�/�/��9r!c�,�SnURU5 g)Nc�$�UR5 gr)rnr�s r�do_close�GExceptionTests.test_generator_close_cleanup_exc_state.<locals>.do_close%s��
�G�G�Ir!r
)rrs  r�&test_generator_close_cleanup_exc_state�5ExceptionTests.test_generator_close_cleanup_exc_state$s��	��/�/��9r!c�,�SnURU5 g)Nc��Sngrr(r�s r�do_del�CExceptionTests.test_generator_del_cleanup_exc_state.<locals>.do_del*s���Ar!r
)rrs  r�$test_generator_del_cleanup_exc_state�3ExceptionTests.test_generator_del_cleanup_exc_state)s��	��/�/��7r!c�4^�U4SjnTRU5 g)Nc�`>�[U5 TRS5 g![a gf=f�Nz should have raised StopIteration)r�rwr��r�rs �r�do_next�EExceptionTests.test_generator_next_cleanup_exc_state.<locals>.do_next/s2���
>��Q���	�	�<�=��!�
��
�s� �
-�-r
)rr s` r�%test_generator_next_cleanup_exc_state�4ExceptionTests.test_generator_next_cleanup_exc_state.����	>�	
�/�/��8r!c�4^�U4SjnTRU5 g)Nc�l>�URS5 TRS5 g![a gf=fr)�sendrwr�rs �r�do_send�EExceptionTests.test_generator_send_cleanup_exc_state.<locals>.do_send9s6���
>����t���	�	�<�=��!�
��
�s�&�
3�3r
)rr(s` r�%test_generator_send_cleanup_exc_state�4ExceptionTests.test_generator_send_cleanup_exc_state8r$r!c�^�"U4SjS5nSm[U"55e! O=f[5 URT5 g)Nc�">�\rSrSrU4SjrSrg)�*ExceptionTests.test_3114.<locals>.MyObjectiEc�0>�[R"5mgr)rlr�rKs �r�__del__�2ExceptionTests.test_3114.<locals>.MyObject.__del__Fs����M�M�O�r!r(N�r#r$r%r&r0r'rRs�r�MyObjectr.Es
���
$�
$r!r3r()r4r	rw)rr3r}s  @r�	test_3114�ExceptionTests.test_3114BsC���	$�	$�
��	��H�J�'�'��	��������!�s�"�&c���"SS[5n"SS[5n"SS[5nUe!Ua�nUnUe!Ua�nUnUe!Ua�nUn	URXQ5 URXr5 URX�5 URUR5 UR	URU5 UR	U	RU5 UeSnAff=fSnAff=fSnAff=f!Uan
U
nSn
A
OSn
A
ff=fUR	UW5 UR	URW	5 UR	U	RW5 URUR5 g)Nc��\rSrSrSrg)�HExceptionTests.test_raise_does_not_create_context_chain_cycle.<locals>.AiRr(Nr�r(r!r�Ar8Rr�r!r9c��\rSrSrSrg)�HExceptionTests.test_raise_does_not_create_context_chain_cycle.<locals>.BiTr(Nr�r(r!r�Br;Tr�r!r<c��\rSrSrSrg)�HExceptionTests.test_raise_does_not_create_context_chain_cycle.<locals>.CiVr(Nr�r(r!r�Cr>Vr�r!r?)r4r^rwrhr�)rr9r<r?�a_r�b_rG�c_�cr}r<s            r�.test_raise_does_not_create_context_chain_cycle�=ExceptionTests.test_raise_does_not_create_context_chain_cycleQsG��	�	�	�	�	�	�	�	�	�	�
 �����
 ��� ��G��� ��A�
 ����� ����-�-�a�3��-�-�a�3��-�-�a�3��)�)�!�-�-�8��
�
�a�m�m�Q�7��
�
�a�m�m�Q�7���� ��	 ��	
 ��"�	��C��	��	
�
�
�c�1���
�
�a�m�m�Q�'��
�
�a�m�m�Q�'����!�-�-�(sf�2�C-�C(�=�C%�C �A�C�B
C�C�C � C%�%C(�(C-�-C0�0D�6C=�=Dc��SnU"5 URW[5 URUR[5 URURRUR5 g![anUnSnANxSnAff=f)Nc�`�[S5e![anXl[S5eSnAff=f�Nr[r�)rgrhrf��exs r�cycle�BExceptionTests.test_no_hang_on_context_chain_cycle1.<locals>.cycle|s0��
#� ��m�#���
#�!#����l�"��
#�s�
�
-�(�-)r4r^rfrhrgr�)rrKr}r<s    r�$test_no_hang_on_context_chain_cycle1�3ExceptionTests.test_no_hang_on_context_chain_cycle1ysj��	#�	��G�	
���c�9�-����c�o�o�z�:��
�
�c�o�o�1�1�3�?�?�C���	��C��	�s�A3�3
B	�=B�B	c�$�"SS[5n"SS[5n"SS[5nURU5nU"5e!Ua?nUnU"5e!Ua'nUnU"5e!Uan	U	n
X�lU
eSn	A	ff=fSnAff=fSnAff=f!,(df   O=fURWRW
5 URU
RW5 URURW5 URURU
5 g)Nc��\rSrSrSrg)�>ExceptionTests.test_no_hang_on_context_chain_cycle2.<locals>.Ai�r(Nr�r(r!rr9rQ�r�r!r9c��\rSrSrSrg)�>ExceptionTests.test_no_hang_on_context_chain_cycle2.<locals>.Bi�r(Nr�r(r!rr<rS�r�r!r<c��\rSrSrSrg)�>ExceptionTests.test_no_hang_on_context_chain_cycle2.<locals>.Ci�r(Nr�r(r!rr?rU�r�r!r?�r4rjrhr�r�)rr9r<r?r��_ar�_brG�_crCs           r�$test_no_hang_on_context_chain_cycle2�3ExceptionTests.test_no_hang_on_context_chain_cycle2�s���	�	�	�	�	�	�	�	�	��
�
�q�
!�R�

 ��c�	���
 ���	 ��#�I��� ��A� ��c�	��� ���()�
���� ��	 ��	
 ��"�
!�� 	
�
�
�b�l�l�A�&��
�
�a�m�m�Q�'��
�
�a�m�m�Q�'��
�
�a�m�m�Q�'se�B�A�B
�B�A�B�B�!A(�(A=	�.
A8	�8A=	�=B�B�B�B
�
B�
Bc��"SS[5n"SS[5n"SS[5n"SS[5n"S	S
[5nURU5nU"5e!Ua^nUnU"5e!UaFn	U	n
U"5e!Ua.nUnX�lU"5e!Uan
U
nU"5nUeSn
A
ff=fSnAff=fSn	A	ff=fSnAff=f!,(df   O=fURWRW5 URURW5 URURW5 URURW
5 URU
RW5 URURU5 g)Nc��\rSrSrSrg)�>ExceptionTests.test_no_hang_on_context_chain_cycle3.<locals>.Ai�r(Nr�r(r!rr9r^�r�r!r9c��\rSrSrSrg)�>ExceptionTests.test_no_hang_on_context_chain_cycle3.<locals>.Bi�r(Nr�r(r!rr<r`�r�r!r<c��\rSrSrSrg)�>ExceptionTests.test_no_hang_on_context_chain_cycle3.<locals>.Ci�r(Nr�r(r!rr?rb�r�r!r?c��\rSrSrSrg)�>ExceptionTests.test_no_hang_on_context_chain_cycle3.<locals>.Di�r(Nr�r(r!r�Drd�r�r!rec��\rSrSrSrg)�>ExceptionTests.test_no_hang_on_context_chain_cycle3.<locals>.Ei�r(Nr�r(r!r�Erg�r�r!rhrV)rr9r<r?rerhr�rWrrXrGrYrC�_d�dr}s                r�$test_no_hang_on_context_chain_cycle3�3ExceptionTests.test_no_hang_on_context_chain_cycle3�sY��	�	�	�	�	�	�	�	�	�	�	�	�	�	�	��
�
�q�
!�R�
$��c�	���
$���$��#�I���$��A�
$��c�	���$���()�
�$�"#�#�I�� �$� "�A� !��A�"#�G��$��$��	$��	
$��"�
!��*	
�
�
�b�l�l�A�&��
�
�a�m�m�Q�'��
�
�a�m�m�Q�'��
�
�a�m�m�Q�'��
�
�a�m�m�Q�'��
�
�a�m�m�Q�'s��C
�A&�&C
�,C�/A6�6C�<B=�?B�B:	�B5	�B�B2�"B-�-B2�2B5	�5B:	�:B=�=C�C�C
�
C
�
Cc���[S5nUe![S5nUe=f![anUnSnAOSnAff=fURUW5 URURW5 grH)rfrgr4r�rh)r�te�ver}r<s     r�,test_context_of_exception_in_try_and_finally�;ExceptionTests.test_context_of_exception_in_try_and_finally�s`��	�
��q�\�������]������	��C��	��	
�
�
�c�2���
�
�c�o�o�r�*s�
��!�
7�2�7c�B�[S5nUe! [S5nUe=f![S5nUe=f![anUnSnAOSnAff=fUR	UW5 UR	UR
W5 UR	UR
R
W5 g)Nr[r�r�)rfrgrPr4r�rh)rrnro�oer}r<s      r�/test_context_of_exception_in_except_and_finally�>ExceptionTests.test_context_of_exception_in_except_and_finally�s���	�
��q�\�����
���]������Q�Z������	��C��	��	
�
�
�c�2���
�
�c�o�o�r�*��
�
�c�o�o�1�1�2�6s$�
��"�0�3�
A	�A�A	c��[S5nUe! O=f[S5nUe![S5nUe=f![anUnSnAOSnAff=fURUW5 URURW5 grH)rgrPr4r�rh)rrorsr}r<s     r�-test_context_of_exception_in_else_and_finally�<ExceptionTests.test_context_of_exception_in_else_and_finally�s���	�	
�� ��]�����	
����
�Q�Z������Q�Z������	��C��	��	
�
�
�c�2���
�
�c�o�o�r�*s)�
&��&�
7�4�7�
A
�A�A
c��[SSSSS5nUR[U5S5 SUlUR[U5S5 SUlS	UlUR[U5S
5 SUlUR[U5S5 S
UlUR[U5S5 [SSSSS5nUR[U5S5 SUlUR[U5S5 SUlS	UlUR[U5S5 SUlUR[U5S5 S
UlUR[U5S5 [SSSS5nUR[U5S5 SUlUR[U5S5 SUlS	UlUR[U5S5 S
UlUR[U5S5 g)Nr�xxxxxr[r�r�z8'baz' codec can't encode characters in position 1-4: foor�z<'baz' codec can't encode character '\x78' in position 1: foolESh
MQ)EzJ'baz' codec can't encode characters in position 1-4: 965230951443685724997i�zK'4000' codec can't encode characters in position 1-4: 965230951443685724997i�zN'4000' codec can't encode characters in position 1000-4: 965230951443685724997sxxxxxz3'baz' codec can't decode bytes in position 1-4: fooz5'baz' codec can't decode byte 0x78 in position 1: foozE'baz' codec can't decode bytes in position 1-4: 965230951443685724997zF'4000' codec can't decode bytes in position 1-4: 965230951443685724997zI'4000' codec can't decode bytes in position 1000-4: 965230951443685724997�xxxxz/can't translate characters in position 1-4: fooz3can't translate character '\x78' in position 1: foozAcan't translate characters in position 1-4: 965230951443685724997zDcan't translate characters in position 1000-4: 965230951443685724997)	r+rAr@r"rrNrr,r.)r�us  r�test_unicode_change_attributes�-ExceptionTests.test_unicode_change_attributess���
�u�g�q�!�U�;������Q��![�\��������Q��!`�a����'�������Q��!m�n���
�����Q��!n�o��������Q��!q�r��u�h��1�e�<������Q��!V�W��������Q��!X�Y����'�������Q��!h�i���
�����Q��!i�j��������Q��!l�m�!�&�!�Q��6������Q��!R�S��������Q��!W�X����'�������Q��!d�e��������Q��!g�hr!c��[[[4nUH-nUR[	URU55S5 M/ g)N�)r+r,r.rAr@�__new__)r�klasses�klasss   r�test_unicode_errors_no_object�,ExceptionTests.test_unicode_errors_no_object6s8��$�&8�:O�O���E����S����u�!5�6��;�r!c	��[[SS5[SS5[S55H�upnSU-nURSX1US9 [SXAUS5nUR	[U5[
5 SSS5 URS	X1US9 [
XAUS5nUR	[U5[
5 SSS5 UR5nURS
X1US9 [SXaUS5nUR	[U5[
5 SSS5 M� g!,(df   N�=f!,(df   N{=f!,(df   GM&=f)N���r�r�rr�)�objlenrr"rLr��	translater�)	rrur?r+r^r@r.r�r,)rrr"r�r$r<�encodeds       r�%test_unicode_error_str_does_not_crash�4ExceptionTests.test_unicode_error_str_does_not_crash<s��#*��"�a�L��"�a�L��!�H�#
��E��
��,�C����h�v���L�(��#�c�2�F���%�%�c�#�h��4�M����k�&�3��O�+�C��R�@���%�%�c�#�h��4�P��j�j�l�G����h�v���L�(��'�#�r�J���%�%�c�#�h��4�M�L�#
�M�L��P�O��
M�L�s$�.D�-D0�$.E�
D-	�0
D>	�
E	c�^�"SS[5n"SS[US9n[5n[5e!UanUR	S5 SnAO&SnAf[a O UR	S5 O=fSSS5 O!,(df   O=fU4SjmT"5nURU[[U55 URS	[U55 g)
Nc��\rSrSrSrSrg)�/ExceptionTests.test_badisinstance.<locals>.MetaiWc��[5err�)�cls�subclasss  r�__subclasscheck__�AExceptionTests.test_badisinstance.<locals>.Meta.__subclasscheck__Xs
�� �l�"r!r(N)r#r$r%r&r�r'r(r!r�Metar�Ws��
#r!r�c��\rSrSrSrg)�6ExceptionTests.test_badisinstance.<locals>.MyExceptioniZr(Nr�r(r!rr\r�Zr�r!r\)�	metaclasszShould have raised KeyErrorz%exception should not be a MyExceptionc�F>�T"5$![anUsSnA$SnAff=fr)r^)r}r�s �rr��,ExceptionTests.test_badisinstance.<locals>.gis$���
��s�
��!�
����
�s�
�
 �� � z maximum recursion depth exceeded)	r1r4rrUrwr^r^r�r@)rr�r\r7r}r<r�s      @r�test_badisinstance�!ExceptionTests.test_badisinstanceSs����	#�4�	#�	�)�t�	��
�&�	
9��j� ���
C��	�	�A�B�B���
��
9��	�	�7�8���
�
��	�
�c�����c�>�4��9�=��
�
�8�#�c�(�Cs7�B�
5�A4�A�B�
A4�B� A4�2B�
Bc�B�SnU"5 [R"5 g)Nc�T�[5n[S5HnURnM g)Ni@B)rru�__dir__)�ors  rr��3ExceptionTests.test_trashcan_recursion.<locals>.fooxs#����A��9�%���I�I��&r!)rr	)rr�s  r�test_trashcan_recursion�&ExceptionTests.test_trashcan_recursionss��
	�	�����r!c���[S5 S[-n[R"SSU5up#nUR	US5 URSU5 URSU5 URSU5 g)	N�_testinternalcapia�if 1:
            import sys
            from _testinternalcapi import get_recursion_depth
            from test import support

            class MyException(Exception): pass

            def setrecursionlimit(depth):
                while 1:
                    try:
                        sys.setrecursionlimit(depth)
                        return depth
                    except RecursionError:
                        # sys.setrecursionlimit() raises a RecursionError if
                        # the new recursion limit is too low (issue #25274).
                        depth += 1

            def recurse(cnt):
                cnt -= 1
                if cnt:
                    recurse(cnt)
                else:
                    generator.throw(MyException)

            def gen():
                f = open(%a, mode='rb', buffering=0)
                yield

            generator = gen()
            next(generator)
            recursionlimit = sys.getrecursionlimit()
            try:
                recurse(support.exceeds_recursion_limit())
            finally:
                sys.setrecursionlimit(recursionlimit)
                print('Done.')
        �-Wd�-cr[sRecursionErrorsResourceWarning�Done.)r�__file__r�assert_python_failurerAr��rr�rc�outrBs     r�$test_recursion_normalizing_exception�3ExceptionTests.test_recursion_normalizing_exception�su���)�*�$�H�I$��J%�:�:�5�$��M��������Q���
�
�'��-��
�
�(�#�.��
�
�h��$r!r�c���Sn[R"SU5up#nURUS5 SnURXT;U<SUSS<S3S9 UR	S	U5 g)
Nz�if 1:
            import _testcapi
            try:
                raise _testcapi.RecursingInfinitelyError
            finally:
                print('Done.')
        r�r[s0RecursionError: maximum recursion depth exceededz not found in i�z... (truncated))r�r�)rr�rAr�r�)rrr�r�rBr:s      r�-test_recursion_normalizing_infinite_exception�<ExceptionTests.test_recursion_normalizing_infinite_exception�sj����%�:�:�4��F��������Q��F��������|�>�#�f�u�+��Xg�-h��i��
�
�h��$r!c�^^^�SnU4SjmU4SjmU4Sjm[R"5nU"S5 TTT4H4nURUS9 U"5 URS5 SSS5 M6 [R
"U5 g![a N/f=f!,(df   Mn=f![R
"U5 f=f)Nc��Sn[R"U5 [R"X-5 g![a US-
nOf=fMHr�)rl�setrecursionlimitr^)�n�depths  r�set_relative_recursion_limit�UExceptionTests.test_recursion_in_except_handler.<locals>.set_relative_recursion_limit�sQ���E����)�)�%�0���!�!�%�'�*��	&���Q�J�E���s�5�A�Ac�.>�SS- g! T"5 g=fr�r()�recurse_in_excepts�rr��JExceptionTests.test_recursion_in_except_handler.<locals>.recurse_in_except�s���
$��!���
$�!�#�s�	�	c�.>�SS- T"5 g! N=fr�r()�recurse_after_excepts�rr��MExceptionTests.test_recursion_in_except_handler.<locals>.recurse_after_except�s!���
��!��
!�"��
��s��c�2>�T"5 g! T"5 g=frr()�recurse_in_body_and_excepts�rr��SExceptionTests.test_recursion_in_except_handler.<locals>.recurse_in_body_and_except�s���
-�*�,��
-�*�,�s��	rT)�funcz#Should have raised a RecursionError)rl�getrecursionlimitr?rwr^r�)rr��recursionlimitr�r�r�r�s    @@@r� test_recursion_in_except_handler�/ExceptionTests.test_recursion_in_except_handler�s����		+�	$�	#�	-��.�.�0��	2�(��,�*�,@�B\�]���\�\�t�\�,�I����	�	�"G�H�
-�,�^�
�!�!�.�1��*�����-�,��
�!�!�.�1�sG�B-�B�B�B�(B-�
B�B�B�B�
B*	�%B-�-Czcannot test Py_TRACE_REFS buildc��Sn[5 [R"SU5up#nURSU5 SSS5 g!,(df   g=f)Na+if 1:
            import _testcapi
            class C(): pass
            def recurse(cnt):
                cnt -= 1
                if cnt:
                    recurse(cnt)
                else:
                    _testcapi.set_nomemory(0)
                    C()
            recurse(16)
        r��MemoryError)rrr�r�r�s     r�)test_recursion_normalizing_with_no_memory�8ExceptionTests.test_recursion_normalizing_with_no_memory�sA����!�
"�(�>�>�t�T�J�L�B�S��M�M�.�#�.�#�
"�
"�s�-A�
Ac�l^^^�SSKmSSKJm UUU4SjnU"5nU"5nTRX#5 g)Nr��raise_memoryerrorc�>�T"5 TRS5 TRW5$![anURnSnAN,SnAff=f)Nz Should have raised a MemoryError)rwrXr��	format_tb)r}r�r�r�	tracebacks  ���r�
raiseMemError�6ExceptionTests.test_MemoryError.<locals>.raiseMemErrorsI���
>�!�#��	�	�<�=��&�&�r�*�*��	�
%��_�_���
%�s�,�
A�A�A)r�r�r�rA)rr��tb1�tb2r�r�s`   @@r�test_MemoryError�ExceptionTests.test_MemoryErrors.���
	�/�	+��o���o������"r!c���SnSnUR[[RS5 [R"S5nUR	[U5[
5 UR
[U[55 URUR5 [R"SU5nURURU5 [R"SUS9nUR
[XT55 "SS	[5n[R"S
UXV45nUR
[Xu55 UR
[Xv55 URURU5 [R"SSUS
S05nUR
[X�55 URURS5 URURS5 g)NzThis is a test docstring.zThis is another test docstring.�error1z_testcapi.error1z_testcapi.error2z_testcapi.error3)�basec��\rSrSrSrg)�1ExceptionTests.test_exception_with_doc.<locals>.CiEr(Nr�r(r!rr?r�Er�r!r?z_testcapi.error4z_testcapi.error5r�rr[)rjrdr��make_exception_with_docr�r1r��
issubclassr4rw�__doc__rArr)	r�doc2�doc4r��error2�error3r?�error4�error5s	         r�test_exception_with_doc�&ExceptionTests.test_exception_with_doc,s}��+��0�����+�y�'H�'H�"�	$��2�2�3E�F���
�
�d�6�l�D�)����
�6�9�5�6����&�.�.�)��2�2�3E�t�L���������.��2�2�3E�8>�@�����
�6�2�3�	��	��2�2�3E�t�4:�;�@�����
�6�2�3����
�6�-�.��������.��2�2�3E�r�39�C��8�E�����
�6�2�3�������1�%��������,r!c�^^^�SSKJm "SS5mSmUUU4SjnU"5 URS5 [5 UR
T"5S5 g![a!nUR	T"5S5 SnANHSnAff=f)Nrr�c��\rSrSrSrg)�3ExceptionTests.test_memory_error_cleanup.<locals>.CiZr(Nr�r(r!rr?r�Zr�r!r?c�N>�T"5n[R"U5mT"5 gr�r�r�)rCr?r�r�s ���r�inner�7ExceptionTests.test_memory_error_cleanup.<locals>.inner]s�����A����Q��B��r!zMemoryError not raised)r�r�rwrX�assertNotEqualr	rA)rr�r}r?r�r�s   @@@r�test_memory_error_cleanup�(ExceptionTests.test_memory_error_cleanupTss���
	0�	�	�
��	 �	0��G�
�I�I�.�/��������t�$���	,������d�+�+��	,�s�A�
B�#A?�?Bc�^^^�"SS5mSmUUU4SjmT"5 URS5 [5 UR	T"5S5 g![a!nURT"5S5 SnANHSnAff=f)Nc��\rSrSrSrg)�6ExceptionTests.test_recursion_error_cleanup.<locals>.Cior(Nr�r(r!rr?r�or�r!r?c�N>�T"5n[R"U5mT"5 grr�)rCr?r�r�s ���rr��:ExceptionTests.test_recursion_error_cleanup.<locals>.innerrs�����A����Q��B��Gr!zRecursionError not raised)rwr^r�r	rA)rr}r?r�r�s  @@@r�test_recursion_error_cleanup�+ExceptionTests.test_recursion_error_cleanuplsn���	�	�
��	�	3��G�
�I�I�1�2��������t�$���	,������d�+�+��	,�s�A�
A>�A9�9A>c��UR[5n[R"[5 SSS5 URWRR[RUR5 g!,(df   NN=fr)	rjrP�os�listdirr�rAr�r��ENOTDIR)rr�s  r�test_errno_ENOTDIR�!ExceptionTests.test_errno_ENOTDIR�sP��
�
�
�w�
'�2��J�J�x� �(�������+�+�U�]�]�B�L�L�I�(�
'�s�A9�9
Bc�D�"SS5nU"5n[R"5nA[5 URURR
UR5 URURR5 SSS5 g!,(df   g=f)Nc��\rSrSrSrSrg)�1ExceptionTests.test_unraisable.<locals>.BrokenDeli�c��[S5nUe)Nz
del is brokenr��rr<s  rr0�9ExceptionTests.test_unraisable.<locals>.BrokenDel.__del__�s�� ��1���	r!r(Nr2r(r!r�	BrokenDelr�s��
r!r)	r�catch_unraisable_exceptionr	rA�
unraisablerr0�assertIsNotNone�
exc_traceback)rrr$r�s    r�test_unraisable�ExceptionTests.test_unraisable�so��	�	��k��
�
/�
/�
1�R���L����R�]�]�1�1�9�3D�3D�E�� � ����!<�!<�=�2�
1�
1�s�A!B�
Bc	��[[4HnURU5 U"S5nUe g!UaN [5n[R
"[R"56 SSS5 O!,(df   O=ff=fWR5nURSU5 URSU5 URURU5 U[LaURSU5 OURSU5 URURS55 SSS5 GM#!,(df   GM3=f)Nztest messager�z	raise excz<exception str() failed>r�)rgr0r?rrl�__excepthook__�exc_info�getvaluer�r#r�r�)rr�r<r7�reports     r�test_unhandled�ExceptionTests.test_unhandled�s���#�%7�8�H����h�'�<�"�>�2�C��I�9�� �<�(�*�f��*�*�C�L�L�N�;�+�*�*�*��<�� ���*���
�
�2�F�;��
�
�k�6�2��
�
�h�/�/��8��1�1��M�M�"<�f�E��M�M�.�&�9�������� 5�6�!(�'�'�'�sE�D0�
0�B�'A1	�'B�/D0�1
B
�;B�>D0�B�B!D0�0
E	c��Sn[SS5HCn[R"SX-5up4nURUS5 URSU5 ME g)Nz�if 1:
            import _testcapi
            class C(): pass
            _testcapi.set_nomemory(0, %d)
            C()
        r[r�r�)r[�xr�)rurr�r�)rrr�r�r�rBs      r�"test_memory_error_in_PyErr_PrintEx�1ExceptionTests.test_memory_error_in_PyErr_PrintEx�sO�����q�"��A�(�>�>�t�T�X�N�L�B�S��M�M�"�h�'��M�M�.�#�.�r!c�^^�"SS[5m"SS[5mUU4SjnU"5nURS5 URT5 URT"55 SSS5 g!,(df   g=f)Nc��\rSrSrSrg)�BExceptionTests.test_yield_in_nested_try_excepts.<locals>.MainErrori�r(Nr�r(r!r�	MainErrorr�r�r!rc��\rSrSrSrg)�AExceptionTests.test_yield_in_nested_try_excepts.<locals>.SubErrori�r(Nr�r(r!r�SubErrorr�r�r!rc3�T># �T"5e!Ta Sv� e!Ta ef=ff=f7frr()rrs��r�main�=ExceptionTests.test_yield_in_nested_try_excepts.<locals>.main�sE����
��k�!���
����� ������
�s(�(��%��%�!�%�!�%�()r4r'rjr�)rr�cororrs   @@r� test_yield_in_nested_try_excepts�/ExceptionTests.test_yield_in_nested_try_excepts�s\���	�	�	�	�y�	�	��v���	�	�$��
�
�
�y�
)��J�J�x�z�"�*�
)�
)�s�A1�1
A?c�^�U4SjnU"5n[e![a TR[U5S5 Of=fTR[U5S5 g)Nc3�># �[e![a Sv� Of=fTR[R"55 Sv� g7frH)rgrwrlr�r5s�rr��?ExceptionTests.test_generator_doesnt_retain_old_exc2.<locals>.g�s>����
� � ���
���
�����c�m�m�o�.��G�s�A���A��,Ar[r�)rSrAr�)rr�r�s`  r�%test_generator_doesnt_retain_old_exc2�4ExceptionTests.test_generator_doesnt_retain_old_exc2�sS���	��c��	+�����	+����T�#�Y��*�	+������c��A�&s��%>�>c��SnUR[5 U"5nSS- SSS5 g! [U5 [U5 N#=f!,(df   g=f)Nc3�# �Sv� e7fr�r(r(r!rr��1ExceptionTests.test_raise_in_generator.<locals>.g�s
����G��r�r[r)rjrhr�)rr�r�s   r�test_raise_in_generator�&ExceptionTests.test_raise_in_generator�sQ��	�
�
�
�0�
1���A�
��!��2�
1��
��Q���Q���
2�
1�s�A
�0�A
�A
�
Az Won't work if __debug__ is Falsec���[qBURS5 g![a<nBUR	U[5 UR[
U5S5 SnAgSnAff=f)Nr��hello)rf�AssertionErrorrwr)r^rAr@rKs  r�test_assert_shadowing�$ExceptionTests.test_assert_shadowing�s\��
#��	,���I�I�*�+��
�	.���!�!�!�^�4����S��V�W�-�-��	.�s�
A!�2A�A!c��"SS[5n[e![anUnSnAUeSnAff=f![a Of=f[S5H+n[e![a
nSnAOSnAff=f[5 M- g)Nc��\rSrSrSrg)�BExceptionTests.test_memory_error_subclasses.<locals>.TestExceptionir(Nr�r(r!r�
TestExceptionr5r�r!r6rT)rXr4rur	)rr6r<�inst�_s     r�test_memory_error_subclasses�+ExceptionTests.test_memory_error_subclasses	s���	�K�	�	�����	��D�	����		��
�	��	���r��A�
�!�!���
���
��
�L�
s.��
/�*�2�/�
?�?�A�
A+�&A+c��S[RS3n[R"SU5up#nUR	SU5 g)NzOif 1:
            import _testcapi
            _testcapi.run_in_subinterp("[0]*z")
            exit(0)
        r�r�)rl�maxsizer�assert_python_okr�)rrr�r8rBs     r�test_memory_error_in_subinterp�-ExceptionTests.test_memory_error_in_subinterp'sB��.�.1�k�k�]�;	���
#�3�3�D�$�?�
��s��
�
�n�c�*r!c���[S5 SnU[S5-n[5 [R"SU5nUR5 URR5nSSS5 SSS5 URWRS5 UR[W5S5 URSU5 g!,(df   N`=f!,(df   Ni=f)Nr�a�a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
a = list(range(0, 1))
z�
            try:
                import _testcapi
                _testcapi.set_nomemory(0)
                b = list(range(1000, 2000))
            except Exception as e:
                import traceback
                traceback.print_exc()
            r�)rr[rr�)rrrr�spawn_python�wait�stdout�readr��
returncode�
assertGreater�len)r�warmup_code�
user_inputr=�outputs     r�test_exec_set_nomemory_hang�*ExceptionTests.test_exec_set_nomemory_hang6s���
	�k�"�5�� �6�+�$��
�!�
"��+�+�D�*�=�������������>�#�
	
�
�
�a�l�l�F�+����3�v�;��*��
�
�n�f�-�
>�=��#�
"�s"�C�+C�)C�
C	�
C�
C"r()NNrL)]r#r$r%r&rEr~r�r�r�r�r�r�r�rrlr<r�requires_resource�
bigmemtestr�rr�r�
skipUnless�platformrrBrLrOrWr_rdrkrorrrxr|r�r
r�r�r�r�r�r�r�r�r�r�r�r�rrrrr"r*r4rDrMrZrkrprtrwr}r�r�r�r�r�r�r
r�r��
Py_TRACE_REFSr�r�r�r�r�r�r
rrr"r'r,r1r9r>rKr'r(r!rr9r90s��4�RC�hI�0'Q�R7�"2�b)�H�_�_�W����+�-X�Y����u�%������5�9�/�:�&�Z�/�
�+��+�Z%0�N�������0�3�5�;�5�;�I@�V!�$�
2�6.�*-�
H�E�	0�'� 1�$*��
-��
-�2�	�	�w�r�>�<
+�+�&+�6
3�+��2:�:�
8�
9�9�
�&)�PD�&"(�H-(�^+�7�$+�$#i�J<�5�.�D��D�>����u�%��&����5%��5%�n�
�_�_�Y�$�&�(<�=��%��>��%�$,2�^��_�_�W�*�*�,M�N�
�_�_�Y�$�&�(<�=�/�>�O��
/�*�
�_�_�Y�$�&�(<�=�#�>��#�$�
�_�_�Y�$�&�(<�=�$-�>��$-�L�
�_�_�Y�$�&�(<�=�%�>��%�,�%��%�(J�>� 7�*��_�_�W�*�*�,M�N�
�_�_�Y�$�&�(<�=�/�>�O��
/� #�.'�$
�����$F�G�
,�H�
,��<�_�_�Y�$�&�(<�=�+�>�+���_�_�W�*�*�,M�N�.�O��.r!r9c�,�\rSrSrSrSrSrSrSrg)�NameErrorTestsiWc�x�[ g![a&nURSUR5 SnAgSnAff=f)N�bluch)rUrYrAr#rs  r�test_name_error_has_name�'NameErrorTests.test_name_error_has_nameXs1��	0����	0����W�c�h�h�/�/��	0�s�	�
9�4�9c�^^�U4SjnU"5 TRS5 TRSWR55 g!TRaZ [R"5n[R
"[R"56 SSS5 Mx!,(df   N�=ff=f)Nc�r>�TR[S5 [ SSS5 g!,(df   g=f)N�aaa)r�rY�aabr5s�rr��)NameErrorTests.test_issue45826.<locals>.f`s"����'�'�	�5�9��:�9�9�s�(�
6z%assertRaisesRegex should have failed.r[)	rw�failureExceptionrrrlr
rr�r�rr�rBs`  r�test_issue45826�NameErrorTests.test_issue45826^s}���	�	?�
�C�

�I�I�=�>��
�
�e�S�\�\�^�,��
�$�$�	4��(�(�*�c��"�"�C�L�L�N�3�+�*�*�*��	4�s)�A�%B,�''B�B,�
B(	�#B,�(B,c�h�SnU"5 UR
SWR55 UR
SUR55 g![aZ [R"5n[R"[R
"56 SSS5 M�!,(df   N�=ff=f)Nc�l�[ g![a nURS5 [5eSnAff=fr)�nonsenser)r]rh)rhs rr��1NameErrorTests.test_issue45826_focused.<locals>.fos1��
*��� �
*�� � ��&�'�)�)��
*�s�	�
3�.�3rcrh)rhrrrlr
rr�rr^s   r�test_issue45826_focused�&NameErrorTests.test_issue45826_focusedns~��	*�	4�
�C�
	
�
�
�j�#�,�,�.�1��
�
�)�3�<�<�>�:��!�	4��(�(�*�c��"�"�C�L�L�N�3�+�*�*�*��	4�s)�A
�
B1�,'B�B1�
B-	�(B1�-B1c�6�SnUR[U5 g)Nc� ^�"U4SjS5mg)Nc�>�\rSrSrY Srg)�;NameErrorTests.test_gh_111654.<locals>.f.<locals>.TestClassi�r(Nr���	TestClasss�rrlrj�s���r!rlr(rks@rr��(NameErrorTests.test_gh_111654.<locals>.f�s
���
�
r!)rjrY�rr�s  r�test_gh_111654�NameErrorTests.test_gh_111654s��	�	
���)�Q�'r!r(N)	r#r$r%r&rVr_reror'r(r!rrSrSWs��0�-� ;�"(r!rSc�&�\rSrSrSrSrSrSrg)�AttributeErrorTestsi�c� �[S5nURUR5 URUR5 [	5n[SSUS9nURURS5 UR
URU5 g)NzOuch!�Ouch�carryr%)rHrwr#r$rrAr�)rr<�sentinels   r�test_attributes�#AttributeErrorTests.test_attributes�sk���W�%�����#�(�(�#����#�'�'�"��8���V�'�x�@��������7�+��
�
�c�g�g�x�(r!c��"SS5nU"5nUR [
R
US5 g![aAnURSUR5 URX#R5 SnAN^SnAff=f![aAnURSUR5 URX#R5 SnAgSnAff=f)Nc��\rSrSrSrSrg)�<AttributeErrorTests.test_getattr_has_name_and_obj.<locals>.Ai�Nr(�r#r$r%r&�blechr'r(r!rr9r{�s���Er!r9rU)rUrHrAr#r$r�__getattribute__�rr9r$r<s    r�test_getattr_has_name_and_obj�1AttributeErrorTests.test_getattr_has_name_and_obj�s���	�	��c��	+��I�I�	+��#�#�C��1��	�	+����W�c�h�h�/����S�'�'�*�*��	+��
�	+����W�c�h�h�/����S�'�'�*�*��	+�s,�7�B�
B�7A=�=B�
C�7C�Cc���"SS5nU"5nUR5 g![aAnURSUR5 URX#R5 SnAgSnAff=f)Nc��\rSrSrSrSrg)�GAttributeErrorTests.test_getattr_has_name_and_obj_for_method.<locals>.Ai�c��grr(r5s rr}�MAttributeErrorTests.test_getattr_has_name_and_obj_for_method.<locals>.A.blech�s��r!r(Nr|r(r!rr9r��s��
r!r9rU)rUrHrAr#r$rs    r�(test_getattr_has_name_and_obj_for_method�<AttributeErrorTests.test_getattr_has_name_and_obj_for_method�s\��	�	��c��	+��I�I�K���	+����W�c�h�h�/����S�'�'�*�*��	+�s�$�
A/�7A*�*A/r(N)r#r$r%r&rwr�r�r'r(r!rrrrr�s��	)�+� 
+r!rrc�,�\rSrSrSrSrSrSrSrg)�ImportErrorTestsi�c�\�[S5nURUR5 URUR5 [SSS9nUR	URS5 URUR5 [SSS9nUR	URS5 URUR5 [SSSS9nUR	URS5 UR	URS5 SnUR[U5 [SS	S
9 SSS5 UR[U5 [SSS	S9 SSS5 UR[U5 [SS
S	S9 SSS5 UR[U5 [S	S
9 SSS5 UR[U5 [SS	SS9 SSS5 g!,(df   N�=f!,(df   N�=f!,(df   N�=f!,(df   Nl=f!,(df   g=f)N�test�
somemodule�r#�somepath��path�somename)r�r#z<ImportError\(\) got an unexpected keyword argument 'invalid'�keyword)�invalidr#)r#r�r�)r�r�T)r��another)rQrwr#r�rAr�rf)rr<r�s   rrw� ImportErrorTests.test_attributes�s����&�!�����#�(�(�#����#�(�(�#��&�|�4��������<�0����#�(�(�#��&�z�2��������:�.����#�(�(�#��&�z�
�C��������:�.�������:�.�M��
�
#�
#�I�s�
3���	�2�4��
#�
#�I�s�
3���V�Y�?�4��
#�
#�I�s�
3���V�Y�?�4��
#�
#�I�s�
3��	�*�4��
#�
#�I�s�
3���	�4�@�4�
3�4�
3��4�
3��4�
3��4�
3��4�
3�s<�G�G*�2G;�
H�H�
G'�*
G8�;
H	�
H�
H+c��[SSSS9nURURS5 URURS5 URURS5 URUR
S5 UR
5 URURS5 URURS5 URURS5 URUR
S5 g)Nr�r#r��r#r��r�r()rQrArr�r#r�rrs  r�test_reset_attributes�&ImportErrorTests.test_reset_attributes�s����&�v�F�;��������9�-�������&�)�������6�*�������6�*�	����������2�&�������$�'�������4�(�������4�(r!c��[S[4SS9 Sn[U5nUR[	U5[	U55 SSS5 g!,(df   g=f)Nr�T)�quietsabc)r�BytesWarningrQrAr@)r�argr<s   r�test_non_str_argument�&ImportErrorTests.test_non_str_argument�sD��
�R��.�d�
;��C��c�"�C����S��X�s�3�x�0�<�
;�
;�s�2A�
Ac�|�[5[SS9[SS9[SSS94GH�n[S0UD6n[[RS-5H�n[R
"[R"X#55nURURS5 URURS5 URURUR5 URURUR5 M� [R[R4H�nU"U5nURURS5 URURS5 URURUR5 URURUR5 M� GM� g)	Nr�r�r�r�r�r�r[r�)r/rQrur3r4rqr5rArr�r#r��copy�deepcopy)rr9�orig�protor<rCs      r�test_copy_pickle�!ImportErrorTests.test_copy_pickle�s?���v���,���,���*�=�?�F��0��0�D��v�6�6��:�;���l�l�6�<�<��#<�=��� � ����9�5�� � ����&�1�� � ����4�9�9�5�� � ����4�9�9�5�<��Y�Y��
�
�-����g��� � ����9�5�� � ����&�1�� � ����4�9�9�5�� � ����4�9�9�5�.�?r!r(N)	r#r$r%r&rwr�r�r�r'r(r!rr�r��s�� A�D)�1�6r!r�c��[U[5(a3[[SSS9nUR	[U55 SSS5 O*[[S5nUR	U5 SSS5 [R"SSS[5up#nURS5R5$!,(df   NM=f!,(df   N^=f)NrKrLrM�wbr�z-X�utf8)
r�r@rmr�writerrr�r��
splitlines)r��testfile�_rc�_outrBs     r�
run_scriptr�s����&�#���
�&�#��
0�H��N�N�6�&�>�*�1�
0��&�$�
�8��N�N�6�"� �"�8�8���f�f�U�N�C�s��:�:�g��)�)�+�+�
1�
0�� �
�s�B2�C�2
C�
Cc�:�\rSrSrSr\S5r\S5rSrg)�AssertionErrorTestsic�"�[[5 gr)rrr5s r�tearDown�AssertionErrorTests.tearDowns	���v�r!c
��S/SQ4S/SQ4S/SQ4S/SQ4S	/S
Q4S	R5/S
Q4SRS5/S
Q4[S	R5-/S
Q4S
/SQ4S/SQ4S/SQ4/nUH=up#URUS9 [U5nUR	USSU5 SSS5 M? g!,(df   MQ=f)Nzassert None)z    assert Nonez           ^^^^r0zassert 0)z    assert 0z           ^r0zassert 1 > 2)z    assert 1 > 2�           ^^^^^r0zassert 1 > 2 and 3 > 2)z    assert 1 > 2 and 3 > 2z           ^^^^^^^^^^^^^^^r0uassert 1 > 2, "messäge")u    assert 1 > 2, "messäge"r�uAssertionError: messägeu)# coding: latin1
assert 1 > 2, "messäge"�latin1z<
             assert (
                 1 > 2)
             )z
    1 > 2)�	    ^^^^^r0zG
             assert (
                 1 > 2), "Message"
             )z    1 > 2), "Message"r��AssertionError: MessagezZ
             assert (
                 1 > 2), \
                 "Message"
             )z
    1 > 2), \r�r��r����)r�rr?r�rA�r�casesr�r:�results     r�test_assertion_error_location�1AssertionErrorTests.test_assertion_error_locations ����
���
���
�&��
�(��
�(�
.�
.�
0��
�:�
@�
@��
J��
��2�9�9�;�
;��
���		
���		
��
�

�_Z
��v!&��F����V��,�#�F�+��� � �����h�7�-�,�!&�,�,�s�!B0�0
B?	c���SSS/4S/SQ4/nUHGup#URUS9 [U5nURU[U5*SU5 SSS5 MI g!,(df   M[=f)NzJ
             assert (
                 1 > 2
             )
             z	    1 > 2r0ze
             assert (
                 1 < 2 and
                 3 > 4
             )
             )z
    1 < 2 andz	    3 > 4r0r�)r?r�rArGr�s     r�test_multiline_not_highlighted�2AssertionErrorTests.test_multiline_not_highlightedqs���� �$��	
���

�
��0!&��F����V��,�#�F�+��� � ���X����!8�(�C�-�,�!&�,�,�s�+A�
A*	r(N)	r#r$r%r&r�r
r�r�r'r(r!rr�r�s4����_8��_8�B�D��Dr!r�c�^�\rSrSrSr\S5rSrSrSr	Sr
SrS	rS
r
SrSrS
rg)�SyntaxErrorTestsi�Nc��S[S54S[S54S[S54S[S54S[S	54S
[S	54S[S	54S[S	54S
[S54/	nUH up#URUS9 [SU5e g![a�n[R"5n[
R"[
R"56 SSS5 O!,(df   O=fURUWR55 UnSnAOSnAff=fSSS5 M�!,(df   M�=f)N��bad.pyr[r��abcdefgr[r�z�
               File "bad.py", line 1
                 abcdefg
                  ^^^^^
             SyntaxError: bad bad
             )r�r[r�r�r[r�z�
               File "bad.py", line 1
                 abcdefg
                  ^
             SyntaxError: bad bad
             )r�r[r�r�r[���)r�r[r�r�r[r�z�
               File "bad.py", line 1
                 abcdefg
                    ^
             SyntaxError: bad bad
             )r�r[���r�r[r�zn
               File "bad.py", line 1
                 abcdefg
             SyntaxError: bad bad
             )r�r[r�r�r[r�)r�r[rr�r[r)r�r[rr�r[r��r�r[r�r�r[�dz�
               File "bad.py", line 1
                 abcdefg
                  ^^^^^^
             SyntaxError: bad bad
             )r�bad bad)
rr?r_rrrlr
rr�r)rr�rr:r<rB�
the_exceptions       r�test_range_of_offsets�&SyntaxErrorTests.test_range_of_offsets�sv��/�
���
�/�
���
�0�
���
�/�
���
�1�
���
�1�
���
�/�
���
�/�
���
�1�
���
�MN
��^$�N�D����4��(�(�%�i��6�6�$��#�(� �0�0�2�c��*�*�C�L�L�N�;�3�2�2���M�M�(�C�L�L�N�;�$'�M��	(��"�)�(�(�(�sH�D0�B�
D"� D�5'C%	�	D�%
C3
�/)D�D0�D"�"D0�0
D?	c�N�"SS[5nU"SS5e![a�n[R"5n[R"[R
"56 SSS5 O!,(df   O=fUR
SWR55 SnAgSnAff=f)Nc��\rSrSrSrg)�5SyntaxErrorTests.test_subclass.<locals>.MySyntaxErrori�r(Nr�r(r!r�
MySyntaxErrorr��r�r!r�r�r�z0
  File "bad.py", line 1
    abcdefg
     ^^^^^
)r_rrrlr
rr�r)rr�r<rBs    r�
test_subclass�SyntaxErrorTests.test_subclass�s���	�K�	�		��	�+L�M�M���	��(�(�*�c��"�"�C�L�L�N�3�+�*�*���M�M��	�\�\�^�	
�
��	�s+�	�
B$�B�'A)� 	B�)
A7	�3'B�B$c�2�UR[[5 Sn[UR	S55nURUSS5 URUSS5 Sn[U5nURUSS5 URUSS	5 g)
NuU# -*- coding: cp437 -*-
"¢¢¢¢¢¢" + f(4, x for x in range(1))
�cp437r�u@    "┬ó┬ó┬ó┬ó┬ó┬ó" + f(4, x for x in range(1))r�z-                          ^^^^^^^^^^^^^^^^^^^z# -*- coding: ascii -*-

(
z    (z    ^)�
addCleanuprrr�r�rA)rr�rBs   r�test_encodings�SyntaxErrorTests.test_encodings�s��������'�
M�	�����w�/�0������R��"d�e�����R��"Q�R�2���� ������R��'�*�����R��'�*r!c�x�UR[[5 [S5nUR	SUS5 g)N��z8SyntaxError: Non-UTF-8 code starting with '\x89' in filer�)r�rrr�r��rrBs  r�
test_non_utf8�SyntaxErrorTests.test_non_utf8	s0�������'���!���
�
�Q�SV�WY�SZ�[r!c�^�U4SjnU"S5nTR[U5S5 TRUR5 TRURS5 TRUR
S5 U"SR
55nTR[U5S5 TRUR5 TRURS5 TRUR
S5 U"[SR
5-5nTR[U5S5 TRUR5 TRURS5 TRUR
S5 U"SR
S55nTR[U5S5 TRUR5 TRURS5 TRUR
S5 U"S	5nTR[U5S5 TRUR5 TRURS5 TRUR
S5 U"S
5nTR[U5S5 TRUR5 TRURS5 TRUR
S5 g)Nc�>�TR[5n[USS5 SSS5 UR$!,(df   WR$=f)Nrbrc)rjr_rvr�)r�r�rs  �r�try_compile�8SyntaxErrorTests.test_string_source.<locals>.try_compile	sA����"�"�;�/�2���
�F�3�0��<�<��0�/��<�<��s	�9�
A�return "ä"z,'return' outside function (<string>, line 1)r[��# coding: latin1
return "ä"r�z,'return' outside function (<string>, line 2)��return "ä" #ääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääää��return "ä" # ääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääää)rAr@rwr�r�r�r�r)rr�r<s`  r�test_string_source�#SyntaxErrorTests.test_string_source	sE���	 �
�-�(������S��#Q�R����#�(�(�#�������Q�'��������,��-�.�.�0�1������S��#Q�R����#�(�(�#�������Q�'��������,��(�]�%9�%9�%;�;�<������S��#Q�R����#�(�(�#�������Q�'��������,��9�@�@��J�K������S��#Q�R����#�(�(�#�������Q�'��������,��5�6������S��#Q�R����#�(�(�#�������Q�'��������,��6�7������S��#Q�R����#�(�(�#�������Q�'��������,r!c��UR[[5 [S5nUR	USS/SQ5 [SR55nUR	USS/SQ5 [[SR5-5nUR	USS/SQ5 [SRS55nUR	USS/SQ5 [S5nUR	USSSS	/5 UR	USSS
S5 [S5nUR	USSSS	/5 UR	USSS
S
5 g)Nr�r�)u    return "ä"z    ^^^^^^^^^^�&SyntaxError: 'return' outside functionr�r�r�r�z    ^^^^^^^^^^^r�r�u�    return "ä" #äääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääär�u�    return "ä" # äääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääää)r�rrr�rAr�rr�s  r�test_file_source�!SyntaxErrorTests.test_file_source?	sm�������'���'������R�S��$C�	D�
��-�-�/�0������R�S��$C�	D�
��M�$8�$8�$:�:�;������R�S��$C�	D�
�8�?�?��I�J������R�S��$C�	D�
�4�5������R�S��*�A�$C�	D�	
����R���#��(E�F��5�6������R�S��*�A�$C�	D�	
����R���#��(F�Gr!c��Sn[SU5nUup4pVpxURX2R5 URXBR5 URXrR5 URXRR
5 URX�R5 URXbR5 URSUR5 g)Nr�r��	r_rAr�r�r�r�r�r�r�)	rrr�r�r�r��errorr�r�s	         r�test_attributes_new_constructor�0SyntaxErrorTests.test_attributes_new_constructore	s���2��#�I�t�4�
�BF�?��&������#9�#9�:�����!5�!5�6�����%=�%=�>�����!5�!5�6�����%=�%=�>����� 2� 2�3�����M�$5�$5�6r!c��Sn[SU5nUup4pVURX2R5 URXBR5 URSUR5 URXRR
5 URSUR5 URXbR5 URSUR5 g)N)r�r[r�r�r�r�)rrr�r�r�r�r�s       r�test_attributes_old_constructor�0SyntaxErrorTests.test_attributes_old_constructorq	s���*��#�I�t�4�
�*.�'��&�����#9�#9�:�����!5�!5�6�����}�7�7�8�����!5�!5�6�����}�7�7�8����� 2� 2�3�����M�$5�$5�6r!c��SnUR[[SU5 SnUR[[SU5 SnUR[[SU5 g)N)r�r[r�r�)r�r[r�r�r�r�r�)r�r[r�r�r[)rjrfr_�rrs  r�test_incorrect_constructor�+SyntaxErrorTests.test_incorrect_constructor}	sM�������)�[�)�T�B�+�����)�[�)�T�B�-�����)�[�)�T�Br!c��[SS5nURSS5 URURS5 URURS5 URUR
S5 URURS5 URURS5 URURS	5 URURS5 URURS
5 [SS5nURSS5 URURS5 URURS5 URUR
S5 URURS5 URURS5 URURS	5 URUR5 URUR5 g)
Nr�)zfile.pyr[r��txtr�r��new_msg��new_file.pyr�r��new_txtr�r�)rrrr�r�rr��rr�r�r)rr)r_rrAr�rr�r�r�r�r�r�rwrKs  r�test_syntax_error_memory_leak�.SyntaxErrorTests.test_syntax_error_memory_leak�	sx����=�>��	�
�
�9�D�E�������	�*�������!T�U�������]�3�������1�%�������1�%��������+�������q�)�������q�)���=�>��	�
�
�9�>�?�������	�*�������!N�O�������]�3�������1�%�������1�%��������+����!�,�,�'����!�,�,�'r!r()r#r$r%r&�maxDiffr
r�r�r�r�r�r�r�r�r�rr'r(r!rr�r��sN���G��X(��X(�t
�+� \�(-�T$H�L
7�
7�C�(r!r�c��\rSrSrSrSrg)�TestInvalidExceptionMatcheri�	c��UR[5 [e!Sa Of=fSSS5 O!,(df   O=fUR[5 [e![S4a Of=fSSS5 g!,(df   g=f)NrE)rjrfrgr5s r�'test_except_star_invalid_exception_type�CTestInvalidExceptionMatcher.test_except_star_invalid_exception_type�	s}��
�
�
�y�
)�
� � ���
��
���	*�
)�
)���
�
�y�
)�
� � ����#�
��
���	*�
)�
)�sG�4��'�4�'�4�
A�A>�A"�"A1�.A>�0A1�1A>�>
Br(N)r#r$r%r&rr'r(r!rr
r
�	s��r!r
c�V�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
SrS
rg)�PEP626Testsi�	c��U"5 URS5 /nWRnU(abURnURURcSO"URURR-
5 URnU(aMbUR[U5U5 g![anURnSnAN�SnAff=f)Nrc)rwr4r�r�r�r0�f_linenor��co_firstlinenorA�tuple)rr�r:rJ�t�lines�frames       r�lineno_after_raise�PEP626Tests.lineno_after_raise�	s���	-�
�C�
�I�I�+�,���
�I�I����J�J�E��L�L����.�����u�|�|�:�:�:�
��	�	�A�
�a�	
����u��x�0���	!�� � �A��	!�s�B-�-
C
�7C�C
c�.�SnURUS5 g)Nc��SS- gr�r(r(r!r�simple�:PEP626Tests.test_lineno_after_raise_simple.<locals>.simple�	s��
�a�C�r!r[�r)rrs  r�test_lineno_after_raise_simple�*PEP626Tests.test_lineno_after_raise_simple�	s��	�	
�����*r!c�.�SnURUS5 g)Nc�(�SS- g! SS- g=fr�r(r(r!r�	in_except�@PEP626Tests.test_lineno_after_raise_in_except.<locals>.in_except�	s��
��!���
��!���s��r�r)rr"s  r�!test_lineno_after_raise_in_except�-PEP626Tests.test_lineno_after_raise_in_except�	s��	�	
���	�1�-r!c�.�SnURUS5 g)Nc�>�SS- g![a
nSnAgSnAff=fr�)rfrIs r�other_except�@PEP626Tests.test_lineno_after_other_except.<locals>.other_except�	s!��
��!����
���
�s��
�r�r)rr(s  r�test_lineno_after_other_except�*PEP626Tests.test_lineno_after_other_except�	s��	�
	
����a�0r!c�.�SnURUS5 g)Nc�H�SS- g![anSS- SnAgSnAff=fr�r3rIs r�in_named_except�@PEP626Tests.test_lineno_in_named_except.<locals>.in_named_except�	s(��
��!����
��!����
�s��
!��!r�r)rr.s  r�test_lineno_in_named_except�'PEP626Tests.test_lineno_in_named_except�	s��	�	
�����3r!c�.�SnURUS5 g)Nc��SS- g!f=fr�r(r(r!r�in_try�.PEP626Tests.test_lineno_in_try.<locals>.in_try�	s��
��!�����s��
r�r)rr4s  r�test_lineno_in_try�PEP626Tests.test_lineno_in_try�	s��	�
	
�����*r!c�.�SnURUS5 g)Nc�&�SS- g!SS- f=fr�r(r(r!r�in_finally_normal�DPEP626Tests.test_lineno_in_finally_normal.<locals>.in_finally_normal�	s"��
���!�����!���s�r�r)rr:s  r�test_lineno_in_finally_normal�)PEP626Tests.test_lineno_in_finally_normal�	���	�	
��� 1�1�5r!c�.�SnURUS5 g)Nc�.�SS- SS- g!SS- f=fr�r(r(r!r�in_finally_except�DPEP626Tests.test_lineno_in_finally_except.<locals>.in_finally_except�	s&��
��!���!�����!���s�
�r�r)rrAs  r�test_lineno_in_finally_except�)PEP626Tests.test_lineno_in_finally_except�	r>r!c�J^�"SS5mU4SjnURUS5 g)Nc� �\rSrSrSrSrSrg)�0PEP626Tests.test_lineno_after_with.<locals>.Noopi�	c��U$rr(r5s rr��:PEP626Tests.test_lineno_after_with.<locals>.Noop.__enter__�	r�r!c��grr(r�s  rr��9PEP626Tests.test_lineno_after_with.<locals>.Noop.__exit__
s��r!r(Nr�r(r!r�NooprG�	s��
�
r!rLc�T>�T"5 SS- SSS5 g!,(df   g=fr�r()rLs�r�
after_with�6PEP626Tests.test_lineno_after_with.<locals>.after_with
s������!������s��
'r�r)rrNrLs  @r�test_lineno_after_with�"PEP626Tests.test_lineno_after_with�	s$���	�	�
	�	
���
�A�.r!c��SnURUS5 URRSS9UlURUS5 g)Nc��SS- gr�r(r(r!rr��8PEP626Tests.test_missing_lineno_shows_as_none.<locals>.f

s	��
�a�Cr!r[s�������)�co_linetable)r�__code__r�rns  r�!test_missing_lineno_shows_as_none�-PEP626Tests.test_missing_lineno_shows_as_none	
sA��	�����1�%��Z�Z�'�'�5T�'�U��
�����4�(r!c�L^�"SS5mU4SjnURUSS5 g)Nc� �\rSrSrSrSrSrg)�CPEP626Tests.test_lineno_after_raise_in_with_exit.<locals>.ExitFailsi
c��U$rr(r5s rr��MPEP626Tests.test_lineno_after_raise_in_with_exit.<locals>.ExitFails.__enter__
r�r!c��[err�r�s  rr��LPEP626Tests.test_lineno_after_raise_in_with_exit.<locals>.ExitFails.__exit__
s�� � r!r(Nr�r(r!r�	ExitFailsr[
s��
�
!r!r`c�R>�T"5 SS- SSS5 g!,(df   g=fr�r()r`s�rrN�DPEP626Tests.test_lineno_after_raise_in_with_exit.<locals>.after_with
s������!�����s��
&r[r)rrNr`s  @r�$test_lineno_after_raise_in_with_exit�0PEP626Tests.test_lineno_after_raise_in_with_exit
s&���	!�	!�	�	
���
�A�q�1r!r(N)r#r$r%r&rrr$r*r0r6r<rCrPrWrcr'r(r!rrr�	s9��1�$+�.�1�4�+�6�6�
/�)�
2r!r�__main__)3r�r�rlr�r3r�r��codecsr�	itertoolsr�textwrapr�test.supportrrrr	r
rrr
�test.support.import_helperr�test.support.os_helperrr�test.support.warnings_helperrr�rr�rrQr4rr*r0�TestCaser9rSrrr�r�r��force_not_colorized_test_classr�r
rr#rr(r!r�<module>rosd���	�
��
������/�/�/�
5�1�7����!��Y���I��
+��+�d.�X�&�&�d.�N9-(�X�&�&�-(�d&+�(�+�+�&+�VJ6�x�(�(�J6�Z,�CD�(�+�+�CD�L	�'�'�K(�x�(�(�K(�(�K(�\�(�"3�"3��k2�(�#�#�k2�Z�z���M�M�O���CP���I��G��s�
E�
E*�)E*

Youez - 2016 - github.com/yon3zu
LinuXploit